Fix bug when add SII keys to invoice automatically based on tax definition

This commit is contained in:
Bernat Brunet Torruella 2019-01-03 15:58:16 +01:00
parent 72ece38af8
commit 4231054f39

View file

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