summaryrefslogtreecommitdiff
path: root/addons/account_tax_python
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-13 16:49:16 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-13 16:49:16 +0200
commitc8b5c013401b9eccabe80be7859dcaeccb387e5b (patch)
tree3a9c62d1494c3bbe885448833e4edf0b7d6f06c7 /addons/account_tax_python
parent052bc3880534e45f168f396005e7cfc3edad0490 (diff)
parent7eb7e9fd6e72764f28df19ab8803e1cceff38b4d (diff)
[MERGE] forward port branch 9.0 up to 7eb7e9fd6e7
Diffstat (limited to 'addons/account_tax_python')
-rw-r--r--addons/account_tax_python/models/account_tax.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_tax_python/models/account_tax.py b/addons/account_tax_python/models/account_tax.py
index 01f8576ec8e..a8f3d77752d 100644
--- a/addons/account_tax_python/models/account_tax.py
+++ b/addons/account_tax_python/models/account_tax.py
@@ -39,7 +39,7 @@ class AccountTaxPython(models.Model):
def compute_all(self, price_unit, currency=None, quantity=1.0, product=None, partner=None):
taxes = self.env['account.tax']
company = self.env.user.company_id
- for tax in self:
+ for tax in self.filtered(lambda r: r.amount_type == 'code'):
localdict = {'price_unit': price_unit, 'quantity': quantity, 'product': product, 'partner': partner, 'company': company}
safe_eval(tax.python_applicable, localdict, mode="exec", nocopy=True)
if localdict.get('result', False):