Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5488 Vistas

If "print self" is:

sale.order.line(440, 441, 442)

How can you get the object sale.order associated to those sale.order.line s?

I want to retrieve a field from that sale.order.

Avatar
Descartar

'order_id' field of 'sale.order.line' object refer to 'sale.order'. Hope it will help you.

Mejor respuesta

if you're @api mulit:

for rec in self:

     rec.order_id.your_filed


or in singleton 

self.order_id.your_field

Avatar
Descartar
Autor

What happens if you do not specify api.multi?

Publicaciones relacionadas Respuestas Vistas Actividad
3
abr 17
8537
1
ago 24
3988
2
ene 24
5585
0
jun 23
2124
1
dic 22
3505