Skip to content

Instantly share code, notes, and snippets.

@jthmiranda
Forked from nbessi/gist:5643542
Created August 25, 2013 16:24
Show Gist options
  • Save jthmiranda/6334771 to your computer and use it in GitHub Desktop.
Save jthmiranda/6334771 to your computer and use it in GitHub Desktop.
<!-- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment