Skip to Content
Menu
This question has been flagged
1 Reply
3271 Views

Hi,

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.

Avatar
Discard
Best Answer

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,

Avatar
Discard
Author

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