Skip to Content
Menu
This question has been flagged
1 Reply
11686 Views

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.


Avatar
Discard
Best Answer

Try the below:

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

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 25
427
0
Sep 23
1498
2
Jun 23
3107
7
Oct 20
9437
1
Jul 20
2622