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

I have created Automated Action on invoice object.

On Creation & Update

Server Action :

sale_order = env['sale.order'].search([('invoice_ids', '=', object.id)])
object.write({'comment': sale_order})

sale_order is display All sale order.

Any one can help to search on many2many field.


アバター
破棄
最善の回答

Try the below:

sale_order = self.env['sale.order'].search([("invoice_ids", "in", self.id)])

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 25
559
1
2月 25
1253
0
9月 23
2224
2
6月 23
4044
7
10月 20
10364