Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
10803 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ก.ย. 20
9196
0
เม.ย. 18
3917
0
มี.ค. 15
3694
0
ก.ค. 25
422
0
เม.ย. 25
922