Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
12702 Zobrazení

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
Zrušit
Nejlepší odpověď

Try the below:

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
418
1
úno 25
1216
0
zář 23
2160
2
čvn 23
3937
7
říj 20
10271