跳至内容
菜单
此问题已终结
1 回复
11759 查看

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
2月 25
473
0
9月 23
1541
2
6月 23
3185
7
10月 20
9478
1
7月 20
2686