Odoo Help


chosing between too tree view

on 9/11/15, 9:50 AM 1,086 views

Hello, I need to choose each time between two trees as the view mode on one2many field in xml file :

I defined too tree in my xml file as follows : 

<record model="ir.ui.view" id="my_tree">

<field name="name">name</field>
<field name="model">model.model</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree editable="bottom" domain="[('widget.view.is_action_enabled('edit')', '=', False)]">
<field name="employee_id"/>
<field name="company_id"/>
<tree domain="[('widget.view.is_action_enabled('edit')', '!=', False)]">
<field name="employee_id"/>
<field name="company_id"/>

when I mentioned <tree editable="bottom"> I will add attachment through tree view itself only. it is looking fine for me. But when I have saved current record and click on row of tree view that is one of the attachment it will not redirect to file details or ir attachment form view. but if i did not mentioned editable="bottom" then it will redirect to form view for same case.

Thank you in Advance :)


Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 9/12/15, 1:14 PM

I didn't try it, but I think you can do that by creating two pages and put a tree in a page, you can then switch between pages based on a condition. A page could be made invisible based on a condition when the view is displayed, but, I think, you could not hide a page interactively.

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/11/15, 9:50 AM
Seen: 1086 times
Last updated: 9/12/15, 3:23 PM