Check 347 taxes when has a tax

#041304
This commit is contained in:
Raimon Esteve 2020-09-17 10:49:36 +02:00
parent 9c4625fbf7
commit 14633959f5

View file

@ -143,10 +143,11 @@ class Invoice(metaclass=PoolMeta):
def check_347_taxes(self):
include = False
for tax in self.taxes:
if tax.tax.operation_347 == 'exclude_invoice':
return False
if tax.tax.operation_347 != 'ignore':
include = True
if tax.tax:
if tax.tax.operation_347 == 'exclude_invoice':
return False
if tax.tax.operation_347 != 'ignore':
include = True
return include
@fields.depends('type', 'aeat347_operation_key')