Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
8012 Vizualizări

Hello my friends;

I have an action type ir.actions.act_window. I have some data values to pass to a field through  context.

I do not know if default values are juste giving with active_id or some like default for char or integer.

My field is many2many.

I have tried this but it is not working.

{'default_delivery_types':record.carrier_id.id}

Need Your help please.

Thanks a lot in advance.

Best regards.

Imagine profil
Abandonează

How to use context: https://goo.gl/XXg5D3

Cel mai bun răspuns

For many2many (X2many) field you have to pass a list of ids which you want to set/link by default while creating a new record

so try

​{'default_delivery_types': [record.carrier_id.id]}

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
feb. 22
2191
3
iun. 19
7176
1
mar. 24
2801
1
ian. 25
1370
2
dec. 23
14758