Use separate XML files for views

This commit is contained in:
Cédric Krier committed 2013-03-13 19:56:27 +01:00
1 parent 25339fbcea
commit fad14531e0
19 files changed
+176 -179

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
include *.odt
include locale/*.po
include doc/*
+8 -93
View File
@@ -6,39 +6,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="line_view_form">
<field name="model">timesheet.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Timesheet Line">
<label name="employee"/>
<field name="employee" colspan="3"/>
<label name="date"/>
<field name="date"/>
<label name="hours"/>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
<label name="work"/>
<field name="work"/>
<label name="description"/>
<field name="description"/>
</form>
]]>
</field>
<field name="name">line_form</field>
</record>
<record model="ir.ui.view" id="line_view_tree">
<field name="model">timesheet.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Timesheet Lines" editable="bottom">
<field name="employee"/>
<field name="date"/>
<field name="hours" widget="float_time"
float_time="company_work_time" sum="Hours"/>
<field name="work" width="300"/>
<field name="description"/>
</tree>
]]>
</field>
<field name="name">line_tree</field>
</record>
<record model="ir.action.act_window" id="act_line_form">
<field name="name">Timesheet Lines</field>
@@ -82,16 +55,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="line_enter_start_view_form">
<field name="model">timesheet.line.enter.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Enter Timesheet">
<label name="employee"/>
<field name="employee"/>
<label name="date"/>
<field name="date"/>
</form>
]]>
</field>
<field name="name">line_enter_start_form</field>
</record>
<record model="ir.action.wizard" id="act_line_enter">
@@ -104,32 +68,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="hours_employee_view_tree">
<field name="model">timesheet.hours_employee</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Hours per Employee">
<field name="employee"/>
<field name="hours" widget="float_time"
float_time="company_work_time" sum="Hours"/>
</tree>
]]>
</field>
<field name="name">hours_employee_tree</field>
</record>
<record model="ir.ui.view" id="hours_employee_view_graph">
<field name="model">timesheet.hours_employee</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<![CDATA[
<graph string="Hours per Employee">
<x>
<field name="employee"/>
</x>
<y>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</y>
</graph>
]]>
</field>
<field name="name">hours_employee_graph</field>
</record>
<record model="ir.action.act_window" id="act_hours_employee_form">
<field name="name">Hours per Employee</field>
@@ -171,16 +115,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="hours_employee_open_start_view_form">
<field name="model">timesheet.hours_employee.open.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Hours per Employee">
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
</form>
]]>
</field>
<field name="name">hours_employee_open_start_form</field>
</record>
<record model="ir.action.wizard" id="act_hours_employee_open">
<field name="name">Hours per Employee</field>
@@ -192,17 +127,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="hours_employee_weekly_view_tree">
<field name="model">timesheet.hours_employee_weekly</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Hours per Employee per Week">
<field name="year"/>
<field name="week"/>
<field name="employee"/>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</tree>
]]>
</field>
<field name="name">hours_employee_weekly_tree</field>
</record>
<record model="ir.action.act_window" id="act_hours_employee_weekly_form">
<field name="name">Hours per Employee per Week</field>
@@ -220,17 +145,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="hours_employee_monthly_view_tree">
<field name="model">timesheet.hours_employee_monthly</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Hours per Employee per Month">
<field name="year"/>
<field name="month"/>
<field name="employee"/>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</tree>
]]>
</field>
<field name="name">hours_employee_monthly_tree</field>
</record>
<record model="ir.action.act_window" id="act_hours_employee_monthly_form">
<field name="name">Hours per Employee per Month</field>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_timesheet',
],
package_data={
'trytond.modules.timesheet': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+12
View File
@@ -0,0 +1,12 @@
<?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. -->
<graph string="Hours per Employee">
<x>
<field name="employee"/>
</x>
<y>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</y>
</graph>
+9
View File
@@ -0,0 +1,9 @@
<?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="Hours per Employee per Month">
<field name="year"/>
<field name="month"/>
<field name="employee"/>
<field name="hours" widget="float_time" float_time="company_work_time"/>
</tree>
+9
View File
@@ -0,0 +1,9 @@
<?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="Hours per Employee">
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
</form>
+8
View File
@@ -0,0 +1,8 @@
<?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="Hours per Employee">
<field name="employee"/>
<field name="hours" widget="float_time" float_time="company_work_time"
sum="Hours"/>
</tree>
+9
View File
@@ -0,0 +1,9 @@
<?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="Hours per Employee per Week">
<field name="year"/>
<field name="week"/>
<field name="employee"/>
<field name="hours" widget="float_time" float_time="company_work_time"/>
</tree>
+9
View File
@@ -0,0 +1,9 @@
<?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="Enter Timesheet">
<label name="employee"/>
<field name="employee"/>
<label name="date"/>
<field name="date"/>
</form>
+15
View 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. -->
<form string="Timesheet Line">
<label name="employee"/>
<field name="employee" colspan="3"/>
<label name="date"/>
<field name="date"/>
<label name="hours"/>
<field name="hours" widget="float_time" float_time="company_work_time"/>
<label name="work"/>
<field name="work"/>
<label name="description"/>
<field name="description"/>
</form>
+11
View File
@@ -0,0 +1,11 @@
<?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="Timesheet Lines" editable="bottom">
<field name="employee"/>
<field name="date"/>
<field name="hours" widget="float_time" float_time="company_work_time"
sum="Hours"/>
<field name="work" width="300"/>
<field name="description"/>
</tree>
+19
View File
@@ -0,0 +1,19 @@
<?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="Work">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active"/>
<label name="parent"/>
<field name="parent"/>
<label name="timesheet_available"/>
<field name="timesheet_available"/>
<label name="timesheet_start_date"/>
<field name="timesheet_start_date"/>
<label name="timesheet_end_date"/>
<field name="timesheet_end_date"/>
<label name="company"/>
<field name="company"/>
</form>
+12
View File
@@ -0,0 +1,12 @@
<?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. -->
<graph string="Hours per Work" type="pie">
<x>
<field name="name"/>
</x>
<y>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</y>
</graph>
+13
View File
@@ -0,0 +1,13 @@
<?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. -->
<board string="Hours per Work">
<hpaned id="hours_per_work">
<child id="tree">
<action name="timesheet.act_work_tree2"/>
</child>
<child id="graph">
<action name="timesheet.act_work_form2"/>
</child>
</hpaned>
</board>
+8
View File
@@ -0,0 +1,8 @@
<?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">
<field name="rec_name"/>
<field name="name" tree_invisible="1"/>
<field name="active" tree_invisible="1"/>
</tree>
+9
View File
@@ -0,0 +1,9 @@
<?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="Hours per Work">
<label name="from_date"/>
<field name="from_date"/>
<label name="to_date"/>
<field name="to_date"/>
</form>
+9
View File
@@ -0,0 +1,9 @@
<?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">
<field name="name"/>
<field name="timesheet_available"/>
<field name="parent" tree_invisible="1"/>
<field name="children" tree_invisible="1"/>
</tree>
+7
View File
@@ -0,0 +1,7 @@
<?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">
<field name="name"/>
<field name="hours" widget="float_time" float_time="company_work_time"/>
</tree>
+7 -85
View File
@@ -6,56 +6,20 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="work_view_form">
<field name="model">timesheet.work</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Work">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active"/>
<label name="parent"/>
<field name="parent"/>
<label name="timesheet_available"/>
<field name="timesheet_available"/>
<label name="timesheet_start_date"/>
<field name="timesheet_start_date"/>
<label name="timesheet_end_date"/>
<field name="timesheet_end_date"/>
<label name="company"/>
<field name="company"/>
</form>
]]>
</field>
<field name="name">work_form</field>
</record>
<record model="ir.ui.view" id="work_view_list">
<field name="model">timesheet.work</field>
<field name="type">tree</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Works">
<field name="rec_name"/>
<field name="name" tree_invisible="1"/>
<field name="active" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">work_list</field>
</record>
<record model="ir.ui.view" id="work_view_tree">
<field name="model">timesheet.work</field>
<field name="type">tree</field>
<field name="priority" eval="16"/>
<field name="field_childs">children</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Works">
<field name="name"/>
<field name="timesheet_available"/>
<field name="parent" tree_invisible="1"/>
<field name="children" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">work_tree</field>
</record>
<record model="ir.action.act_window" id="act_work_tree">
@@ -102,15 +66,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="type">tree</field>
<field name="priority" eval="16"/>
<field name="field_childs">children</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Works">
<field name="name"/>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</tree>
]]>
</field>
<field name="name">work_tree2</field>
</record>
<record model="ir.action.act_window" id="act_work_tree2">
<field name="name">Works</field>
@@ -127,19 +83,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="work_view_graph">
<field name="model">timesheet.work</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<![CDATA[
<graph string="Hours per Work" type="pie">
<x>
<field name="name"/>
</x>
<y>
<field name="hours" widget="float_time"
float_time="company_work_time"/>
</y>
</graph>
]]>
</field>
<field name="name">work_graph</field>
</record>
<record model="ir.action.act_window" id="act_work_form2">
<field name="name">Hours per Work</field>
@@ -156,20 +100,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="work_hours_board">
<field name="type">board</field>
<field name="model"></field>
<field name="arch" type="xml">
<![CDATA[
<board string="Hours per Work">
<hpaned id="hours_per_work">
<child id="tree">
<action name="timesheet.act_work_tree2"/>
</child>
<child id="graph">
<action name="timesheet.act_work_form2"/>
</child>
</hpaned>
</board>
]]>
</field>
<field name="name">work_hours_board</field>
</record>
<record model="ir.action.act_window" id="act_work_hours_board">
<field name="name">Hours per Work</field>
@@ -184,16 +115,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="work_open_start_view_form">
<field name="model">timesheet.work.open.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Hours per Work">
<label name="from_date"/>
<field name="from_date"/>
<label name="to_date"/>
<field name="to_date"/>
</form>
]]>
</field>
<field name="name">work_open_start_form</field>
</record>
<record model="ir.action.wizard" id="act_open_work">