Skip to Content
Menu
This question has been flagged
1 Reply
1997 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
1
Aug 25
292
2
Jun 25
1737
0
Mar 25
1609
0
Feb 25
1254
3
Aug 24
5955