Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5059 Lượt xem

Hi,

I have a form with a One2Many tree. Whenever I select a line in the tree I want to display its details below the tree not in a popup form - something like master details view- .

If I made the tree 'non editable' then a popup will be shown which is not the required behavior!

If I made the tree 'editable' then I can't find a way to trigger the selection of a tree line!.

Your help is appreciated,

Regards, 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You should use onchange function. When you are referring below the tree, does it mean below the one2many field or new line in tree view?

Using onchange function you can achieve, you should know what you have to return.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thank you Atchuthan, 

But this is is not the required behavior. Let me say it in another way:

If I select a line in the One2Many tree widget I need to perform some action and display some data below the tree  based on the selected line. Then when I select another line update the result below the tree.

Regards,  

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In tree view, if you add editable="bottom", it will make the tree view as default and editable instead of using FORM view.

<tree string="YOUR STRING" editable="bottom">
..
</tree>

You can check sale module as a reference https://github.com/odoo/odoo/blob/8.0/addons/sale/sale_view.xml#L164-L185

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 15
4525
1
thg 9 20
3173
0
thg 6 18
3563
0
thg 3 15
5820
2
thg 7 25
7626