From a4fbd2e0ffe239d3413c2aee9203565e06bbf7c8 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Fri, 11 Sep 2009 21:01:07 +0530 Subject: [PATCH] [FIX] Account : Making account.invoice.tax field language-depenant from account.tax lp bug: https://launchpad.net/bugs/407293 fixed bzr revid: jvo@tinyerp.com-20090911153107-r8dw1nf94xuyllmy --- addons/account/invoice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index ad38ff87e68..be9b4f63246 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -429,8 +429,9 @@ class account_invoice(osv.osv): ait_obj = self.pool.get('account.invoice.tax') for id in ids: cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,)) - partner = self.browse(cr, uid, id).partner_id - context.update({'lang': partner.lang}) + partner = self.browse(cr, uid, id,context=context).partner_id + if partner.lang: + context.update({'lang': partner.lang}) for taxe in ait_obj.compute(cr, uid, id, context=context).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute