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

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
Zrušit

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

Nejlepší odpověď

if you're @api mulit:

for rec in self:

     rec.order_id.your_filed


or in singleton 

self.order_id.your_field

Avatar
Zrušit
Autor

What happens if you do not specify api.multi?

Related Posts Odpovědi Zobrazení Aktivita
3
dub 17
8816
1
srp 24
4200
2
led 24
5795
0
čvn 23
2292
1
pro 22
3654