Use custom Lang instance instead of fr_FR for FEC

The lang fr_FR has been removed and we can not rely on the user configuration
of the language to format the FEC.

issue6435
review36351002
This commit is contained in:
Cédric Krier committed 2017-04-25 18:43:17 +02:00
1 parent e1722b9ce3
commit 7a58b08a09
1 file changed
+6 -3
+6 -3
View File
@@ -124,13 +124,16 @@ class AccountFrFEC(Wizard):
def get_format_date(self):
pool = Pool()
Lang = pool.get('ir.lang')
fr, = Lang.search([('code', '=', 'fr_FR')])
return lambda value: Lang.strftime(value, fr.code, '%Y%m%d')
return lambda value: Lang.strftime(value, 'fr_FR', '%Y%m%d')
def get_format_number(self):
pool = Pool()
Lang = pool.get('ir.lang')
fr, = Lang.search([('code', '=', 'fr_FR')])
fr = Lang(
decimal_point=',',
thousands_sep='',
grouping='[]',
)
return lambda value: Lang.format(fr, '%.2f', value)
def get_start_balance(self):