In OpenERP 6.1, there were res.partner and res.partner.address.
A lot of fields.related exists in res.partner to get data from res.partner.address.
eg from res_partner class:
'address': fields.one2many('res.partner.address', 'partner_id', 'Contacts'),
'city': fields.related('address', 'city', type='char', string='City'),
'function': fields.related('address', 'function', type='char', string='function'),
'subname': fields.related('address', 'name', type='char', string='Contact Name'),
'phone': fields.related('address', 'phone', type='char', string='Phone'),
'mobile': fields.related('address', 'mobile', type='char', string='Mobile'),
So, how the ORM engine knows from which 'address' all these data should be get since 'address' can be filled with multiple records ?
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
|Asked: 8/1/14, 3:51 AM|
|Seen: 800 times|
|Last updated: 3/16/15, 8:10 AM|