diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-13 18:45:07 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-13 18:45:07 +0200 |
| commit | 268cf9d04ab5144446cb010aeda3715460126e65 (patch) | |
| tree | 45d8049b6fe7fee25bbec4138befad981b3a29b3 /addons/account_tax_python | |
| parent | 917ba745ea188a622279b8e51723d6d3b8815535 (diff) | |
| parent | 127dea7f6682b6cb46a914acaf5e0e088953d334 (diff) | |
[MERGE] forward port branch saas-15 up to 127dea7f668
Diffstat (limited to 'addons/account_tax_python')
| -rw-r--r-- | addons/account_tax_python/models/account_tax.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account_tax_python/models/account_tax.py b/addons/account_tax_python/models/account_tax.py index 7ab0c2bbe1f..8b438b82859 100644 --- a/addons/account_tax_python/models/account_tax.py +++ b/addons/account_tax_python/models/account_tax.py @@ -37,9 +37,9 @@ class AccountTaxPython(models.Model): @api.multi def compute_all(self, price_unit, currency=None, quantity=1.0, product=None, partner=None): - taxes = self.env['account.tax'] + taxes = self.filtered(lambda r: r.amount_type != 'code') 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): |
