Skip to Content
Menu
This question has been flagged
1 Reply
1974 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
2
Jun 25
1627
0
Mar 25
1505
0
Feb 25
1145
3
Aug 24
5844
1
Apr 24
33