Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5644 Widoki

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.

Awatar
Odrzuć

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

Najlepsza odpowiedź

if you're @api mulit:

for rec in self:

     rec.order_id.your_filed


or in singleton 

self.order_id.your_field

Awatar
Odrzuć
Autor

What happens if you do not specify api.multi?

Powiązane posty Odpowiedzi Widoki Czynność
3
kwi 17
8820
1
sie 24
4214
2
sty 24
5799
0
cze 23
2295
1
gru 22
3654