Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7082 Visualizzazioni

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
Abbandona
Risposta migliore

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
Avatar
Abbandona
Autore

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!

Post correlati Risposte Visualizzazioni Attività
0
set 19
5280
6
lug 24
45882
2
mar 24
17155
0
dic 19
6360
1
ago 23
2078