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

Hi

There is a many2many field which is viewing with many2many_tags widget . 

<field name="tag_ids" widget="many2many_tags" placeholder="Tags..." options="{'no_create_edit': True}"/>

In the tag_ids model I have regular 'sequence' field. If the many2many field has tree/list view I can manage the drag / movable option of the many2many table by using following:

<field name="tag_ids">
<tree create="false" delete="false">
  <field name="sequence" widget="handle"/>
  <field name="display_name"/>
</tree>
</field>


Is there any way to use widget='handle' with many2many_tags?

Avatar
Discard
Best Answer

There is no way to do it without a huge customization due that it's not designed for that, also you can't do widget='handle'  and widget="many2many_tags" for the same field and there are no proccessing of node childs for widget many2many_tags and no way to specify which field will be used to handle the order for widget="handle"

so no, there is no way to get it with odoo default js widgets

Avatar
Discard
Author

Thanks. But that would be great if those tags could be moved.

I think that they should respect the order setted in another tree view using a field with widget="handle" as long as that field is the same used on model._order

Author

The problem is the tag names will be shown on the website. So, there can be 20tags to 100tags for each record. Sometimes it is needed to show which tags should be shown first and which later. So, from backend they need to be defined by adding/removing. That is why it would be great if there is drag option for many2many_tags.

Related Posts Replies Views Activity
2
Oct 21
3788
2
Apr 23
27993
1
Feb 24
836
0
Jul 24
1501
0
Jul 22
60