Odoo Help


How to display parent table data in child table

on 6/30/15, 2:31 AM 631 views


I am using Odoo7. In sales order, I want to display some data from sale_order table in sale_order_line (one2many). How can it be possible? Please help me with a solution.


Please create a field in Sale Order line model which you want to show information from sale order with field.related type on order_id column of Sale Order line.  Because order_id is linked to Sale Order.  

For the example, please see definition of order_partner_id column in Sale Order line model.

'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', store=True, string='Customer'),

same like above field, you can define more fields which you want to show from Sale Order into Sale order line.

Hope this helps,

Thank you Emirpo Technologies. I'll try and implement it.

on 6/30/15, 5:44 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.


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)


Asked: 6/30/15, 2:31 AM
Seen: 631 times
Last updated: 6/30/15, 3:06 AM