Fix bug on patch merge from master

This commit is contained in:
Bernat Brunet 2020-01-21 00:34:11 +01:00
parent 3bfea87d8c
commit 25f9cf79d9
1 changed files with 9 additions and 9 deletions

View File

@ -1,13 +1,13 @@
diff --git a/tax.py b/tax.py diff --git a/tax.py b/tax.py
--- a/trytond/trytond/modules/account/tax.py Thu Gen 20 10:25:13 2020 +0200 --- a/trytond/trytond/modules/account/tax.py Thu Gen 20 10:25:13 2020 +0200
+++ b/trytond/trytond/modules/account/tax.py Thu Gen 20 10:32:48 2020 +0200 +++ b/trytond/trytond/modules/account/tax.py Thu Gen 20 10:32:48 2020 +0200
@@ -906,7 +906,8 @@ class Tax(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin): @@ -893,7 +893,8 @@ class Tax(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
if len(tax.childs): if tax.type != 'none':
values.extend( value = tax._process_tax(price_unit)
cls._unit_compute(tax.childs, price_unit, date)) res.append(value)
- if tax.update_unit_price: - if tax.update_unit_price:
+ if (tax.update_unit_price or + if (tax.update_unit_price or
+ tax.parent and tax.parent.update_unit_price): + tax.parent and tax.parent.update_unit_price):
for value in values:
unit_price_variation += value['amount'] unit_price_variation += value['amount']
res.extend(values) if len(tax.childs):
res.extend(cls._unit_compute(tax.childs, price_unit, date))