Skip to Content
Menu
This question has been flagged
1 Reply
1763 Views

Is there a way to get all product tags in dictionary?

From this object:

product.product_template_attribute_value_ids


Or maybe there is simpler way then, what I'm doing.


currently I'm iterating with list comprehension:

[x.display_name.split(":") for x in product.product_template_attribute_value_ids]

Avatar
Discard
Best Answer

You can get it as below:


product_attribute = product.product_template_attribute_value_ids.attribute_id.mapped('name')

the result will look like thsi:

['Legs', 'Color']
Avatar
Discard
Related Posts Replies Views Activity
3
Aug 24
2830
1
Apr 24
30
3
Apr 24
570
1
Jan 24
913
1
Oct 23
1944