diff --git a/base_ubl/models/ubl.py b/base_ubl/models/ubl.py index b43cf634f8..30986b8a99 100644 --- a/base_ubl/models/ubl.py +++ b/base_ubl/models/ubl.py @@ -450,14 +450,14 @@ def _ubl_add_item( node_name="ClassifiedTaxCategory", version=version, ) - for attribute_value in product.attribute_line_ids.mapped("value_ids"): + for ptav in product.product_template_attribute_value_ids._only_active(): item_property = etree.SubElement( item, ns["cac"] + "AdditionalItemProperty" ) property_name = etree.SubElement(item_property, ns["cbc"] + "Name") - property_name.text = attribute_value.attribute_id.name + property_name.text = ptav.attribute_id.name property_value = etree.SubElement(item_property, ns["cbc"] + "Value") - property_value.text = attribute_value.name + property_value.text = ptav.name @api.model def _ubl_add_tax_subtotal(