Created
May 24, 2013 13:34
-
-
Save nbessi/5643542 to your computer and use it in GitHub Desktop.
You can use ir.values in OpenERP to force an action on a hierarchical tree view when you click on a row
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Opening task when double clicking on project --> | |
<record id="dblc_proj" model="ir.actions.act_window"> | |
<field name="res_model">project.task</field> | |
<field name="name">Project's tasks</field> | |
<field name="view_type">form</field> | |
<field name="view_mode">tree,form,calendar,graph,gantt,kanban</field> | |
<field name="domain">[('project_id', 'child_of', [active_id])]</field> | |
<field name="context">{'project_id':active_id, 'active_test':False}</field> | |
</record> | |
<record id="ir_project_task_open" model="ir.values"> | |
<field eval="'tree_but_open'" name="key2"/> | |
<field eval="'project.project'" name="model"/> | |
<field name="name">View project's tasks</field> | |
<field eval="'ir.actions.act_window,'+str(dblc_proj)" name="value"/> | |
</record> |
Is it possible to have multiple hierarchical view for same object with different menus?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
instead of use str(dblc_proj), sur str(ref('dblc_proj')) to keep compatibility with old version