Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
10681 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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!


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
4
wrz 20
9095
0
kwi 18
3800
0
mar 15
3599
0
lip 25
306
0
kwi 25
775