Odoo Help


Showing record from another object as one2many

Ajeng Shilvie
on 1/16/15, 5:04 AM 726 views

how to show record from another objek as one2many in current objek ? it just showing and saving it's id ,,

example i have 2 objek , it called first object and second object both of them has partner id , i create some data in first objek. Then all data from first objek have to shown in second object one2many field base on partner_id , how to do that ? thanks

nic question ajeng..

aci aisha
on 1/16/15, 5:06 AM

r u an odoo partner?

aci aisha
on 1/16/15, 5:06 AM

No, i am a developer .. Do you know the answer for my question?

Ajeng Shilvie
on 1/16/15, 5:13 AM
On 1/16/15, 6:21 AM

Firstly, both must be linked to res.partner, right?  So, you for the 2nd object you can create field one2many field in res.partner first.

Then you create a related field from 1st object, using partner_id as the link.  e.g. 'field_from_2nd_obj': field.related('partner_id', 'field_name_of_2nd_obj_in_res_partner'', type='one2many', ....).  Then you can use this in the view.

@ivan what fields are in one2many res.partner ? is it same as my second object line ?

Ajeng Shilvie
on 1/16/15, 7:07 AM

If you don't have it already then you should create it first, and yes it should link to the 2nd object.

on 1/16/15, 7:34 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: 1/16/15, 5:04 AM
Seen: 726 times
Last updated: 3/16/15, 8:10 AM