Hello!!
Please guys, is there a way to show the elements of a One2Many field in the TREE VIEW??!!
Is here any suggestion.
Thanks a lot in advance.
Best Regards.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello!!
Please guys, is there a way to show the elements of a One2Many field in the TREE VIEW??!!
Is here any suggestion.
Thanks a lot in advance.
Best Regards.
try this as an exempl:
this code will be in the .py file in a certain class named equipement:
'centre_id':fields.many2one('cvt.centre','_Centre',select=True,required=True),
and here is declaration of the ralated field that I want to show which is placed in a class named centre in the same file:
'properties1':fields.one2many('cvt.equipement','centre_id','_Equipement'),
so the xml file to specify the tree view will be:
<record model="ir.ui.view" id="centre_tree">
<field name="name">centre.tree</field>
<field name="model">cvt.centre</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="tree">
<field name='name'/>
...
<field name='properties1'/>
</tree>
</field>
</record>
so this will show a new field named _Equipement in center tree view and
hope this helps you
It's doesn show anything, field One2many is a obj so how can it show key;value in tree view?
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 1 23
|
4726 | ||
|
4
thg 12 23
|
17643 | ||
|
1
thg 9 16
|
7364 | ||
|
6
thg 6 16
|
4148 | ||
|
0
thg 3 15
|
3612 |