5

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?

Sami
  • 8,168
  • 9
  • 66
  • 99
Charif DZ
  • 14,415
  • 3
  • 21
  • 40

1 Answers1

4

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)

ChesuCR
  • 9,352
  • 5
  • 51
  • 114
  • Thank you for your help but there is now change more search is always there it's really a problem my be because i'm using Odoo 9?!! – Charif DZ Jun 01 '16 at 13:26
  • Did you try the module? You are right, the module is not migrated to Odoo 9. Another reason can be that is a many2many field. Did you try with the widget selection? – ChesuCR Jun 02 '16 at 08:41
  • widget selection works fine with many2one but manay2many no because it select only one element but is used widget="many2many_checkboxes" for now but the problem is when you need with a big set of items you see !! but i think i can work the write acces to remove the write to create for the user – Charif DZ Jun 03 '16 at 07:30
  • @Sami what version of Odoo are you using? The module of the second solution was migrated to Odoo 10. Doesn't it work either for many2many fields? – ChesuCR May 10 '18 at 17:58
  • Using odoo11 and I need to use `many2many_tags` because i need a select list dropdown with multiple selection – Sami May 14 '18 at 09:44
  • @Sami OK, the module wasn't migrated to Odoo 11 yet. – ChesuCR May 14 '18 at 10:04