diff --git a/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py b/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py index 32fb0ba4def..3c04849f7d0 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py +++ b/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py @@ -88,8 +88,8 @@ class AccountEdiXmlCII(models.AbstractModel): "shall be categorized with an Invoiced item VAT category code (BT-151).") def _check_non_0_rate_tax(self, vals): - for line_vals in vals['tax_details_per_record']: - tax_rate_list = line_vals['line'].tax_ids.flatten_taxes_hierarchy().mapped("amount") + for line_vals in vals['tax_details']['tax_details_per_record']: + tax_rate_list = line_vals.tax_ids.flatten_taxes_hierarchy().mapped("amount") if not any([rate > 0 for rate in tax_rate_list]): return _("When the Canary Island General Indirect Tax (IGIC) applies, the tax rate on " "each invoice line should be greater than 0.")