Odoo Help


2 Answers
Dishan Madushanka
07-11-18 00:48

Hi ,

In python file you should need to set the field as a One2many field

Ex: x = fields.One2many('relationship_class', 'x_field', string='X')

In you XML file you should need to indicate the filed as tree view

Under the tree tag you should need to mention the fields that you need to view from the related object

Ex : 

<notebook string="X_title">

    <page string="X_title">

        <field name="x">

            <tree editable="bottom">

                <field name="x1_field"/>

                <field name="x2_field"/>





06-11-18 23:05

Ok, You have two model, A and B. Now create a one2many field in your model A with model B. In other words make a one2many relation between model A and B. Now if you display that one2many field in your model A (form view inside notebook), it will display like a tree view.


Stel een vraag
Keep Informed
1 volger(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now