Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
7074 Ansichten

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
Verwerfen
Beste Antwort

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
Avatar
Verwerfen
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!

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Sept. 19
5274
6
Juli 24
45875
2
März 24
17153
0
Dez. 19
6358
1
Aug. 23
2073