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

I am editing my custom xml code and want to enable no_create only if another model's field is a certain value.

i.e. options="{"no_create": [('field_x', '=', 1)]}"

Currently I can only get the no_create option to work by setting it to True. Is there a particular syntax I may be missing to enable the use case described above?


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

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
อวตาร
ละทิ้ง
ผู้เขียน

Unfortunately that work around won't work for me. For my case, if I have to create a second dummy field to then toggle I would rather generate an entirely new view. Thanks tho!

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 19
4568
6
ก.ค. 24
44365
2
มี.ค. 24
16697
0
ธ.ค. 19
5869
Field editing after create a form แก้ไขแล้ว
1
ส.ค. 23
1591