跳至内容
菜单
此问题已终结
1 回复
7072 查看

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!

相关帖文 回复 查看 活动
0
9月 19
5273
6
7月 24
45874
2
3月 24
17147
0
12月 19
6358
1
8月 23
2072