Skip to content

Commit c7dee35

Browse files
[FIX] base_ubl: use variant attributes
1 parent d8396e8 commit c7dee35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base_ubl/models/ubl.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,14 @@ def _ubl_add_item(
450450
node_name="ClassifiedTaxCategory",
451451
version=version,
452452
)
453-
for attribute_value in product.attribute_line_ids.mapped("value_ids"):
453+
for ptav in product.product_template_attribute_value_ids:
454454
item_property = etree.SubElement(
455455
item, ns["cac"] + "AdditionalItemProperty"
456456
)
457457
property_name = etree.SubElement(item_property, ns["cbc"] + "Name")
458-
property_name.text = attribute_value.attribute_id.name
458+
property_name.text = ptav.attribute_id.name
459459
property_value = etree.SubElement(item_property, ns["cbc"] + "Value")
460-
property_value.text = attribute_value.name
460+
property_value.text = ptav.name
461461

462462
@api.model
463463
def _ubl_add_tax_subtotal(

0 commit comments

Comments
 (0)