Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
7808 Tampilan

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
Buang

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

Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Feb 22
1965
3
Jun 19
6946
1
Mar 24
2487
1
Jan 25
1062
2
Des 23
14242