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

When you go to the list of Product Variants (Sales/Products/Product Variants) you get a nice list with in the column named Attribute Values nice little rounded boxes with Key:Value like Legs:aluminium; Top:wood, this is great it gives you all the information needed.

But in almost all other views i get to see Table (aluminium, wood) which is a lot less informative.

It even shows up like that in manufacturing, in a production order. ... the workers don't even know if its the legs or the top that need to be in aluminium or wood, but for the position.

What is the cleanest way to nicely display variants as (key: value) pairs on quotations/orders/production orders/ delivery slips ..etc..



Avatar
Discard
Best Answer

Hi Jaco: You can add widget="many2many_tags" to the many2many fields where you need to see this. Use the view inheritance mechanism to extend the base views and add this attribute to the views where you need to see these. 

Avatar
Discard
Author

When i go to Manufacturing orders, select the one i am interested in, i see Table (aluminium, wood) in the product_id field. If i edit the form and add the widget as suggested i get errors

Author

Basically i want to change the default string representation of product_id, which in case its a variant, includes the variantValue, but not the Key

The field on which you use widget="many2many_tags" needs to be a many2many field. product_id is not a many2many field. You may have to add a related field to display the field attribute_value_ids in the form.