minor fix get_tax_amount
This commit is contained in:
parent
9ff52e7b50
commit
ef8ee435b8
3
sale.py
3
sale.py
|
@ -132,7 +132,8 @@ class Sale(metaclass=PoolMeta):
|
|||
amounts = []
|
||||
if taxes_update_id:
|
||||
for l in self.lines:
|
||||
if not l.product or (not hasattr(l.product, 'extra_tax') or not l.product.extra_tax):
|
||||
classification_tax = any(t.classification_tax == '02' for t in l.taxes)
|
||||
if not l.product or (not hasattr(l.product, 'extra_tax') or not l.product.extra_tax or not classification_tax):
|
||||
continue
|
||||
raw_val = Decimal(float(l.product.extra_tax) * l.quantity)
|
||||
val = self.currency.round(raw_val)
|
||||
|
|
Loading…
Reference in New Issue