diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-13 19:32:35 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-13 19:32:35 +0200 |
| commit | 1e17035f71f1b01c3694e4eaa92cb4baac528305 (patch) | |
| tree | bc34d29869decd861b7c9f7d6e8e4e1fa49a5e94 /addons/account_tax_python | |
| parent | 0f9302af1facd0c5872a377782300e55206301e8 (diff) | |
| parent | 268cf9d04ab5144446cb010aeda3715460126e65 (diff) | |
[MERGE] forward port branch saas-16 up to 268cf9d04ab
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): |
