From e13a4bcdcdfa6bb4443300887de3aa58439697b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Nov 2012 18:01:01 +0100 Subject: [PATCH] Store default language in database review592004 --- purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 6b1dce412e..88eb290a4f 100644 --- a/purchase.py +++ b/purchase.py @@ -10,7 +10,6 @@ from trytond.backend import TableHandler from trytond.pyson import Eval, Bool, If, PYSONEncoder, Id from trytond.transaction import Transaction from trytond.pool import Pool, PoolMeta -from trytond.config import CONFIG __all__ = ['Purchase', 'PurchaseInvoice', 'PurchaseIgnoredInvoice', 'PurchaseRecreadtedInvoice', 'PurchaseLine', 'PurchaseLineTax', @@ -333,10 +332,11 @@ class Purchase(Workflow, ModelSQL, ModelView): return 2 def on_change_with_party_lang(self, name=None): + Config = Pool().get('ir.configuration') if self.party: if self.party.lang: return self.party.lang.code - return CONFIG['language'] + return Config.get_language() def get_tax_context(self): context = {}