Reviewers: ,
Please review this at http://codereview.tryton.org/202001/ Affected files: M purchase.py Index: purchase.py =================================================================== --- a/purchase.py +++ b/purchase.py @@ -10,6 +10,7 @@ from trytond.pyson import Eval, Bool, If, PYSONEncoder from trytond.transaction import Transaction from trytond.pool import Pool +from trytond.config import CONFIG _STATES = { 'readonly': Eval('state') != 'draft', @@ -269,7 +270,7 @@ party = party_obj.browse(vals['party']) if party.lang: return party.lang.code - return 'en_US' + return CONFIG['language'] def get_tax_context(self, purchase): party_obj = Pool().get('party.party') @@ -378,7 +379,7 @@ if purchase.party.lang: res[purchase.id] = purchase.party.lang.code else: - res[purchase.id] = 'en_US' + res[purchase.id] = CONFIG['language'] return res def get_untaxed_amount(self, purchases): -- [email protected] mailing list
