diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-13 16:55:42 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-13 16:55:42 +0200 |
| commit | c8194a7647ce7ae2d83ac94aba3e8f4748b5411b (patch) | |
| tree | 46bd394d070aa8fdfc0cba81e0a51347d6fcff9a /addons/account_tax_python | |
| parent | 48f88992da66a12eb0653a8a69b7d4e0e9389d9e (diff) | |
| parent | c8b5c013401b9eccabe80be7859dcaeccb387e5b (diff) | |
[MERGE] forward port branch 10.0 up to c8b5c013401
Diffstat (limited to 'addons/account_tax_python')
| -rw-r--r-- | addons/account_tax_python/models/account_tax.py | 2 |
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 7ab0c2bbe1f..26c1a4bddca 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): |
