コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7976 ビュー

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.

アバター
破棄

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

最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
1
2月 22
2176
3
6月 19
7150
1
3月 24
2780
1
1月 25
1328
2
12月 23
14718