Skip to Content
Menu
This question has been flagged
1 Reply
10773 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
0
Sep 23
1026
2
Jun 23
2471
7
Oct 20
8879
1
Jul 20
2199
2
Mar 17
5870