From dda2e37d3a9010117f42825e5655dbd7309aad2c Mon Sep 17 00:00:00 2001 From: Bernat Brunet Torruella Date: Sun, 8 Jul 2018 23:09:34 +0200 Subject: [PATCH] Fix bug when get information from tax --- invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index cd87491..4250fe7 100644 --- a/invoice.py +++ b/invoice.py @@ -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):