I noticed that whenever you type comma in integer field, odoo (or python) automatically removes that comma and merges numbers (for example whenever you type 1,3 it will become 13). If I type 1.3 or 1;3 etc. everything is fine. Probably I could do something like @api.constrains for a field, but how I could fix this for whole system?
我注意到,无论何时在整数字段中键入逗号,odoo(或python)都会自动删除该逗号并合并数字(例如,每当您键入1,3时它将变为13)。如果我输入1.3或1; 3等等一切都很好。可能我可以做@ api.constrains这样的字段,但我怎么能解决这个问题呢?
Thank you for your time considering my question.
感谢您抽出宝贵时间考虑我的问题。
1 个解决方案
#1
0
This depends on the language the user has chosen. Under Settings/Translations/Languages
(in newer versions of Odoo you first need to activate developer mode to see this menu) chose a language and look into "Thousands Separator" and "Decimal Separator".
这取决于用户选择的语言。在设置/翻译/语言(在较新版本的Odoo中,您首先需要激活开发人员模式以查看此菜单)选择一种语言并查看“千位分隔符”和“十进制分隔符”。
For example using German language it's the other way around, because we use comma as decimal separator and dot as thousands separator.
例如,使用德语是另一种方式,因为我们使用逗号作为小数分隔符并使用点作为千位分隔符。
So nothing to program here, it's just a configuration issue.
所以没有什么可以在这里编程,这只是一个配置问题。
#1
0
This depends on the language the user has chosen. Under Settings/Translations/Languages
(in newer versions of Odoo you first need to activate developer mode to see this menu) chose a language and look into "Thousands Separator" and "Decimal Separator".
这取决于用户选择的语言。在设置/翻译/语言(在较新版本的Odoo中,您首先需要激活开发人员模式以查看此菜单)选择一种语言并查看“千位分隔符”和“十进制分隔符”。
For example using German language it's the other way around, because we use comma as decimal separator and dot as thousands separator.
例如,使用德语是另一种方式,因为我们使用逗号作为小数分隔符并使用点作为千位分隔符。
So nothing to program here, it's just a configuration issue.
所以没有什么可以在这里编程,这只是一个配置问题。