Odoo Help

0

How do you get sale.order from sale.order.line?

By
E.M.
on 2/9/16, 6:04 AM 609 views

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.

Hiral Patel (hip)
on 2/9/16, 6:08 AM
1
Ahmed M.Elmubarak
On 2/9/16, 7:44 AM

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?

E.M.
on 2/9/16, 10:52 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/9/16, 6:04 AM
Seen: 609 times
Last updated: 2/9/16, 10:53 AM