Odoo在PyCharm中无法调试的问题
# Jun 25, 2020打开odoo\tools\translate.py文件,找到函数resetlocale(),大约在1152行(v13)中添加一行代码:
ln = ln[0:ln.index('.')]
如下:
try:
return locale.setlocale(locale.LC_ALL, ln)
改为:
try:
ln = ln[0:ln.index('.')] # 添加此行
return locale.setlocale(locale.LC_ALL, ln)
此问题貌似不会出现在英文windows中,所以Odoo官方一直没注意到这个问题;此解决办法对Odoo 12同样有效。