Skip to Content
Menú
This question has been flagged
1 Respondre
8049 Vistes

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
Descartar

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

Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
1
de febr. 22
2244
3
de juny 19
7198
1
de març 24
2858
1
de gen. 25
1399
2
de des. 23
14789