Fix bug when get information from tax
This commit is contained in:
parent
41756ed7e0
commit
dda2e37d3a
|
@ -170,13 +170,13 @@ class Invoice:
|
|||
def _set_sii_keys(self):
|
||||
tax = None
|
||||
for t in self.taxes:
|
||||
if t.tax_used:
|
||||
tax = t
|
||||
if t.txa.tax_used:
|
||||
tax = t.tax
|
||||
break
|
||||
if not tax:
|
||||
return
|
||||
for field in _SII_INVOICE_KEYS:
|
||||
setattr(self, field, getattr(tax.tax, field))
|
||||
setattr(self, field, getattr(tax, field))
|
||||
|
||||
@fields.depends(*_SII_INVOICE_KEYS)
|
||||
def _on_change_lines_taxes(self):
|
||||
|
|
Loading…
Reference in New Issue