[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
This commit is contained in:
Jay (Open ERP)
2009-09-11 21:01:07 +05:30
parent c6e801a2d1
commit a4fbd2e0ff
+3 -2
View File
@@ -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