跳至內容
選單
此問題已被標幟
2 回覆
5711 瀏覽次數

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.

頭像
捨棄

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

最佳答案

if you're @api mulit:

for rec in self:

     rec.order_id.your_filed


or in singleton 

self.order_id.your_field

頭像
捨棄
作者

What happens if you do not specify api.multi?

相關帖文 回覆 瀏覽次數 活動
3
4月 17
8939
1
8月 24
4321
2
1月 24
5907
0
6月 23
2416
1
12月 22
3804