Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7062 Lượt xem

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?


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
Ảnh đại diện
Huỷ bỏ
Tác giả

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!

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 19
5269
6
thg 7 24
45864
2
thg 3 24
17144
0
thg 12 19
6346
1
thg 8 23
2069