Odoo Help


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.


Can I display object.related_field.related_field type data in a tree view?

Kit Sunde
on 9/11/14, 3:56 PM 488 views

I tried just using normal dot notation which doesn't work:

<tree string="Scheduled Emails">
  <field name="order_id.partner_id"/>

How would I display the partner_id in the view?



| 5 3 6
Jakarta, Indonesia
On 9/12/14, 1:15 AM

Kit, you can add a related column into the model and display that related column.  So in your case, add the following:

'partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Partner')

then include the new field (partner_id) in your view.  Note that I'm just guessing that you are referring to a res.partner model.  If not, please update the above code accordingly.



| 5 4 7
Bengaluru, India

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 9/12/14, 1:53 AM

s you can

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)


Asked: 9/11/14, 3:56 PM
Seen: 488 times
Last updated: 3/16/15, 8:10 AM