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

Hi,

When i have a many2one fields and the related table is empty i have the option to create and edit said object from the model that holds the many2one in the form of a dropdown list, right?

Is any way that i can eliminate that option alltogether? If there is no record in the related table that it will say only that?

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

<field name="name_id" edit="false"/>

อวตาร
ละทิ้ง

sorry you can try this <field name="name_id" widget="selection"/>

ผู้เขียน

A selection widget? Uhmn, never could have guessed it, i am going to try it. Thanks.

คำตอบที่ดีที่สุด

This is a duplicate question. You can see original question How to Hide Save, Remove Option.

อวตาร
ละทิ้ง
ผู้เขียน

Actually i don't want to remove the create or save button from my form, i just want to remove the option to create it from a many2one call. I want the people not be able to create a client from a sale order for example. Not the create button from the clients view.

ผู้เขียน

I don't want to eliminate the create or save button, i just want, for example, stop the user from creating a new client from a sale order via the many2one client field.

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.พ. 25
35421
2
มิ.ย. 23
2852
Show related objects of the same model. แก้ไขแล้ว
2
ส.ค. 15
4907
1
ก.ค. 23
2425
1
พ.ค. 23
2689