summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Laurent <olt@odoo.com>2015-09-16 10:29:41 +0200
committerOlivier Laurent <olt@odoo.com>2015-09-16 10:31:05 +0200
commit5ffb09a5dfdee8c1b42072be8ceb3e4b90a50f3d (patch)
treea2d608172c26d181771abcd7e532562e4b3400dd
parent03d0cac7cca7511711676a65a9394b1f212451a9 (diff)
[FIX] account_voucher: use 'voucher' instead of 'self' in _compute_total
Using 'self' triggers a ValueError: Expected singleton
-rw-r--r--addons/account_voucher/account_voucher.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 586357ffff1..8475868e8d0 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -49,7 +49,7 @@ class AccountVoucher(models.Model):
total = 0
tax_amount = 0
for line in voucher.line_ids:
- tax_info = line.tax_ids.compute_all(line.price_unit, self.currency_id, line.quantity, line.product_id, voucher.partner_id)
+ tax_info = line.tax_ids.compute_all(line.price_unit, voucher.currency_id, line.quantity, line.product_id, voucher.partner_id)
total += tax_info.get('total_included', 0.0)
tax_amount += sum([t.get('amount',0.0) for t in tax_info.get('taxes', False)])
voucher.amount = total + voucher.tax_correction