[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) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
This commit is contained in:
Hubert Van de Walle (huvw)
2021-10-14 15:08:51 +00:00
parent 4aacc0edb8
commit 7fd7ac1f31
+1 -2
View File
@@ -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