コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
10684 ビュー

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

アバター
破棄
最善の回答

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!


アバター
破棄
最善の回答

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

アバター
破棄
著作者

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.

関連投稿 返信 ビュー 活動
4
9月 20
9096
0
4月 18
3804
0
3月 15
3603
0
7月 25
313
0
4月 25
781