Odoo Help

Welcome!

This community 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.

0

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

By
E.M.
on 2/9/16, 6:04 AM 338 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

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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