mirror of
https://github.com/NaN-tic/trytond-project_template.git
synced 2023-12-14 02:02:58 +01:00
fix views, creating spcecific views for templates and remove field from standard project/task views
This commit is contained in:
parent
282f2b72ae
commit
5e1bb1e8b5
5 changed files with 105 additions and 19 deletions
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook" position="before">
|
||||
<label name="template"/>
|
||||
<field name="template"/>
|
||||
<label name="percentage"/>
|
||||
<field name="percentage"/>
|
||||
</xpath>
|
||||
</data>
|
54
view/work_template_form.xml
Normal file
54
view/work_template_form.xml
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Works Efforts" col="6">
|
||||
<label name="work"/>
|
||||
<field name="work" colspan="3"/>
|
||||
<label name="active"/>
|
||||
<field name="active" xexpand="0"/>
|
||||
<label name="type"/>
|
||||
<field name="type"/>
|
||||
<label name="parent"/>
|
||||
<field name="parent"/>
|
||||
<label name="sequence"/>
|
||||
<field name="sequence"/>
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
<label name="party"/>
|
||||
<field name="party"/>
|
||||
<label name="party_address"/>
|
||||
<field name="party_address"/>
|
||||
<label name="template"/>
|
||||
<field name="template"/>
|
||||
<label name="percentage"/>
|
||||
<field name="percentage"/>
|
||||
<notebook colspan="8">
|
||||
<page string="General" id="general" col="6">
|
||||
<label name="timesheet_available"/>
|
||||
<field name="timesheet_available"/>
|
||||
<newline/>
|
||||
<label name="effort"/>
|
||||
<field name="effort" widget="float_time" float_time="company_work_time"/>
|
||||
<newline/>
|
||||
<label name="hours"/>
|
||||
<field name="hours" widget="float_time" float_time="company_work_time"/>
|
||||
<label name="total_effort"/>
|
||||
<field name="total_effort" widget="float_time" float_time="company_work_time"/>
|
||||
<newline/>
|
||||
<separator name="comment" colspan="6"/>
|
||||
<field name="comment" colspan="6"/>
|
||||
<group col="4" colspan="6" id="state_buttons">
|
||||
<group col="2" colspan="2" id="state">
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
<group col="20" colspan="2" id="buttons">
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Children" id="children"
|
||||
states="{'invisible': Not(Equal(Eval('type'), 'project'))}">
|
||||
<field name="children" colspan="4"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
14
view/work_template_list.xml
Normal file
14
view/work_template_list.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Works Efforts">
|
||||
<field name="work"/>
|
||||
<field name="template"/>
|
||||
<field name="percentage"/>
|
||||
<field name="hours" widget="float_time" float_time="company_work_time"/>
|
||||
<field name="total_effort" widget="float_time"
|
||||
float_time="company_work_time"/>
|
||||
<field name="type"/>
|
||||
<field name="state"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
</tree>
|
15
view/work_template_tree.xml
Normal file
15
view/work_template_tree.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Works Efforts">
|
||||
<field name="rec_name"/>
|
||||
<field name="template"/>
|
||||
<field name="percentage"/>
|
||||
<field name="hours" widget="float_time" float_time="company_work_time"/>
|
||||
<field name="total_effort" widget="float_time" float_time="company_work_time"/>
|
||||
<field name="type"/>
|
||||
<field name="state"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
<field name="parent" tree_invisible="1"/>
|
||||
<field name="children" tree_invisible="1"/>
|
||||
</tree>
|
30
work.xml
30
work.xml
|
@ -4,12 +4,26 @@
|
|||
<tryton>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="work_view_form">
|
||||
<field name="model">project.work</field>
|
||||
<field name="inherit" ref="project.work_view_form"/>
|
||||
<field name="name">work_form</field>
|
||||
<record model="ir.ui.view" id="work_template_view_tree">
|
||||
<field name="model">project.work</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_childs">children</field>
|
||||
<field name="name">work_template_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="work_template_view_list">
|
||||
<field name="model">project.work</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">work_template_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="work_template_view_form">
|
||||
<field name="model">project.work</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">work_template_form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.action.act_window" id="project.act_work_tree">
|
||||
<field name="domain">[('parent', '=', None),('template', '=', False)]</field>
|
||||
</record>
|
||||
|
@ -33,13 +47,13 @@
|
|||
<record model="ir.action.act_window.view"
|
||||
id="act_work_tree_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="project.work_view_tree"/>
|
||||
<field name="view" ref="work_template_view_tree"/>
|
||||
<field name="act_window" ref="act_work_tree"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_work_tree_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="project.work_view_form"/>
|
||||
<field name="view" ref="work_template_view_form"/>
|
||||
<field name="act_window" ref="act_work_tree"/>
|
||||
</record>
|
||||
<menuitem parent="project.menu_project" action="act_work_tree"
|
||||
|
@ -52,13 +66,13 @@
|
|||
<record model="ir.action.act_window.view"
|
||||
id="act_work_list_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="project.work_view_list"/>
|
||||
<field name="view" ref="work_template_view_list"/>
|
||||
<field name="act_window" ref="act_work_list"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view"
|
||||
id="act_work_list_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="project.work_view_form"/>
|
||||
<field name="view" ref="work_template_view_form"/>
|
||||
<field name="act_window" ref="act_work_list"/>
|
||||
</record>
|
||||
<menuitem parent="menu_template_tree" action="act_work_list"
|
||||
|
|
Loading…
Reference in a new issue