summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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