Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6084 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

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

Autor

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.

Publicaciones relacionadas Respuestas Vistas Actividad
2
oct 21
4944
2
abr 23
29414
1
feb 24
1873
0
jul 24
2842
0
jul 22
60