Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove the "Search more... " option from a many to many field?

Tags:

If I show the many2many field with the widget many2many_tags the option "Search more..." appears in the drop-down menu. How can I avoid it?

<field name="groups_id" 
       widget="many2many_tags"  
       create="0" 
       options="{'no_create_edit': True,'no_quick_create':True,'no_create':True,'no_open':True}"/>

enter image description here

Is there a way to remove the "Search more... " option?

like image 303
Charif DZ Avatar asked May 31 '16 14:05

Charif DZ


People also ask

How do you remove Create and Edit option from many2one field in Odoo?

We can remove single create edit ,search from single fields by passing options in xml <field name='field_name' options="{'no_create_edit': True}" />.

How do I search many2one fields in Odoo 14?

I select "Join a group" in "My Groups" category, 2. click "Create", 3. click the expand option for "Authorized Group" many2one list 4. There are listed "Create and Edit" and "Search More..." options.


1 Answers

You have some options:

  • You can use the widget="selection" if it is a many2one field.
  • You can install the module web_m2x_options, but you should write a limit in this case like this:

    <field name="groups_id" 
           options="{'limit': 10, 'create': false, 'create_edit': false}"/>
    
  • As an alternative, you can also use the many2many_checkboxes widget:

    <field name="location_ids" widget="many2many_checkboxes"/>
    

    You can even show the checkboxes in two columns as I have written here (solution for Odoo 10 and 11)

like image 145
ChesuCR Avatar answered Sep 28 '22 02:09

ChesuCR