跳至內容
選單
此問題已被標幟
1 回覆
12763 瀏覽次數

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
519
1
2月 25
1247
0
9月 23
2194
2
6月 23
4028
7
10月 20
10343