Hi all,
I'm using the new V8 version of ODOO. I've added product_attributes via attribute_line_ids of my product.template.
In my template i've added a one2many_list field with attribute_line_ids:
<field name="attribute_line_ids" widget="one2many_list">
<tree string="Variants" editable="bottom">
<field name="attribute_id" />
<field name="value_ids" widget="many2many_tags" domain="[('attribute_id', '=', attribute_id)]" context="{'default_attribute_id': attribute_id}"/>
</tree>
</field>
Now, I would like to filter and reorder these values:
- Attribute1: Value 1
- Attribute3: Value 3
- Attribute2: Value 2
Let's say I would like to hide Attribute2 and put Attribute1 underneath Attribute3:
- Attribute3: Value 3
- Attribute1: Value 1
Is there a way to control this list? Or is it always alphabetic?
Rick, You have to handle the _order of that one2many model.
Reorder records in tree view using handle widget: https://learnopenerp.blogspot.com/2022/05/use-handle-widget-to-reorder-records-in-tree-view-odoo15.html