From 009dbafcca57d6ccb49a259e2dc391a060f4e9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 7 Jun 2015 17:34:44 +0200 Subject: [PATCH] [IMP] mis_builder: remove old api remnant --- mis_builder/models/mis_builder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mis_builder/models/mis_builder.py b/mis_builder/models/mis_builder.py index 015bb0ae..a34f8a76 100644 --- a/mis_builder/models/mis_builder.py +++ b/mis_builder/models/mis_builder.py @@ -206,12 +206,10 @@ class MisReportKpi(models.Model): divider_label = '' # format number following user language value = round(value / float(divider or 1), dp) or 0 - value = self.env.registry['res.lang'].format( - self.env.cr, self.env.uid, [lang_id], + value = self.env['res.lang'].browse(lang_id).format( '%%%s.%df' % (sign, dp), value, - grouping=True, - context=self.env.context) + grouping=True) value = u'%s\N{NO-BREAK SPACE}%s%s' % \ (value, divider_label, suffix or '') value = value.replace('-', u'\N{NON-BREAKING HYPHEN}')