From 629e2395e005e869f38d0f547e798a1292871aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Nov 2012 18:01:04 +0100 Subject: [PATCH] Store default language in database review592004 --- sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale.py b/sale.py index 63bf9de675..d8ee3297a2 100644 --- a/sale.py +++ b/sale.py @@ -12,7 +12,6 @@ from trytond.backend import TableHandler from trytond.pyson import If, Eval, Bool, PYSONEncoder, Id from trytond.transaction import Transaction from trytond.pool import Pool, PoolMeta -from trytond.config import CONFIG __all__ = ['Sale', 'SaleInvoice', 'SaleIgnoredInvoice', 'SaleRecreatedInvoice', 'SaleLine', 'SaleLineTax', 'SaleLineInvoiceLine', 'SaleLineIgnoredMove', @@ -385,9 +384,10 @@ class Sale(Workflow, ModelSQL, ModelView): return res def on_change_with_party_lang(self, name=None): + Config = Pool().get('ir.configuration') if self.party and self.party.lang: return self.party.lang.code - return CONFIG['language'] + return Config.get_language() def on_change_lines(self): pool = Pool()