Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
12526 Prikazi

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
Opusti
Best Answer

Try the below:

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jul. 25
163
1
feb. 25
1064
0
sep. 23
2070
2
jun. 23
3800
7
okt. 20
10109