Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
8016 Vues

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.

Avatar
Ignorer

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

Meilleure réponse

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]}

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
févr. 22
2198
3
juin 19
7177
1
mars 24
2804
1
janv. 25
1372
2
déc. 23
14761