From 7fd7ac1f31c7e5ad7025eaee199f5f893ae25bde Mon Sep 17 00:00:00 2001 From: "Hubert Van de Walle (huvw)" Date: Wed, 1 Sep 2021 16:13:52 +0000 Subject: [PATCH] [FIX] base: Allow empty thousands separator in reports Steps to follow - Set the thousands_sep of the current lang to an empty string or null - Create a report -> The thousand separator from the system locale will be used instead to format numbers Solution Use an empty string if there is no thousands separator opw-2507441 closes odoo/odoo#78384 X-original-commit: 767adf94c3162c1d93d93aa638200f73123f4ab6 Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: Hubert Van De Walle --- odoo/addons/base/models/res_lang.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/odoo/addons/base/models/res_lang.py b/odoo/addons/base/models/res_lang.py index efce8bece9e..ecca41e0bb1 100644 --- a/odoo/addons/base/models/res_lang.py +++ b/odoo/addons/base/models/res_lang.py @@ -211,8 +211,7 @@ class Lang(models.Model): @tools.ormcache('self.code', 'monetary') def _data_get(self, monetary=False): - conv = locale.localeconv() - thousands_sep = self.thousands_sep or conv[monetary and 'mon_thousands_sep' or 'thousands_sep'] + thousands_sep = self.thousands_sep or '' decimal_point = self.decimal_point grouping = self.grouping return grouping, thousands_sep, decimal_point