FIX pass scenario test

This commit is contained in:
Raimon Esteve 2019-01-30 16:53:19 +01:00
parent b6967e1bc6
commit ab1f882b8c
2 changed files with 4 additions and 1 deletions

View file

@ -149,7 +149,8 @@ class Invoice(metaclass=PoolMeta):
amount = 0
for tax in self.taxes:
if tax.tax.include_347 and tax.tax.recargo_equivalencia:
if tax.tax.include_347 and (hasattr(tax.tax, 'recargo_equivalencia')
and tax.tax.recargo_equivalencia):
amount += tax.amount
elif tax.tax.include_347:
amount += (tax.base + tax.amount)

View file

@ -46,8 +46,10 @@ Create chart of accounts::
Create tax::
>>> tax = create_tax(Decimal('.10'))
>>> tax.include_347 = True
>>> tax.save()
>>> tax2 = create_tax(Decimal('.10'))
>>> tax2.include_347 = True
>>> tax2.save()
Create party::