Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
11722 Visualizações

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
Cancelar
Melhor resposta

Try the below:

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

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
fev. 25
449
0
set. 23
1522
2
jun. 23
3137
7
out. 20
9458
1
jul. 20
2663