Not check sii_book_key tax when invoice taxes is not related from the tax

#044065
This commit is contained in:
Raimon Esteve 2021-05-04 14:17:08 +02:00
parent 67b363f7ef
commit 3a54dcc480
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ class Invoice(metaclass=PoolMeta):
def _set_sii_keys(self):
tax = None
for t in self.taxes:
if t.tax.sii_book_key:
if t.tax and t.tax.sii_book_key:
tax = t.tax
break
if not tax: