Skip to Content
Menu
This question has been flagged
2 Replies
10659 Rodiniai

Hi I need to remove or disable search option in many2one widget. I'm using openerp version 6.1 Any help...thanks in advanced.

Portretas
Atmesti
Best Answer

Sorry that this is almost a decade late, but for anyone that's still searching:

You can use domains to achieve this functionality

e.g.

<field name="job_id" domain="[('id', '=', -1)]"/>

Applying a domain that returns no results, as seen in the example, essentially forces the user to create a new record in order to select a value for this field.

Good luck!


Portretas
Atmesti
Best Answer

Adding widget="selection" in xml against many2one field should solve your problem

Portretas
Atmesti
Autorius

Thanks for answer my question, but i can't use that solution, because I need to create and edit elements in that widget. There is a way to disable Create option: attrs="{'nocreate':[('coordenada_id','!=','')]", I need something similar with Search option . Any help will be welcome....pd: sorry my English.

Related Posts Replies Rodiniai Veikla
4
rugs. 20
9093
0
bal. 18
3787
0
kov. 15
3596
0
liep. 25
293
0
bal. 25
766