summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJay (Open ERP) <jvo@tinyerp.com>2009-09-11 21:01:07 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2009-09-11 21:01:07 +0530
commita4fbd2e0ffe239d3413c2aee9203565e06bbf7c8 (patch)
tree572503807c3212f57377bebc1f23276f2481c78e /addons
parentc6e801a2d1414460f99e910a42767d9fd0db99bb (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/account/invoice.py5
1 files 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