Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6576 Zobrazení

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?


Avatar
Zrušit
Nejlepší odpověď

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
Avatar
Zrušit
Autor

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 Odpovědi Zobrazení Aktivita
0
zář 19
4531
6
čvc 24
44248
2
bře 24
16654
0
pro 19
5829
1
srp 23
1550