Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
10691 Tampilan

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

Avatar
Buang
Jawaban Terbai

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!


Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Penulis

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.

Post Terkait Replies Tampilan Aktivitas
4
Sep 20
9101
0
Apr 18
3823
0
Mar 15
3607
0
Jul 25
327
0
Apr 25
792