Skip to content

Commit 3e7bdd2

Browse files
[FIX] base_ubl: use variant attributes
1 parent b1a9b7f commit 3e7bdd2

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
@@ -443,14 +443,14 @@ def _ubl_add_item(
443443
node_name="ClassifiedTaxCategory",
444444
version=version,
445445
)
446-
for attribute_value in product.attribute_line_ids.mapped("value_ids"):
446+
for ptav in product.product_template_attribute_value_ids._only_active():
447447
item_property = etree.SubElement(
448448
item, ns["cac"] + "AdditionalItemProperty"
449449
)
450450
property_name = etree.SubElement(item_property, ns["cbc"] + "Name")
451-
property_name.text = attribute_value.attribute_id.name
451+
property_name.text = ptav.attribute_id.name
452452
property_value = etree.SubElement(item_property, ns["cbc"] + "Value")
453-
property_value.text = attribute_value.name
453+
property_value.text = ptav.name
454454
return item
455455

456456
@api.model

0 commit comments

Comments
 (0)