1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="hr_timesheet_line_tree" model="ir.ui.view">
6 <field name="name">hr.analytic.timesheet.tree</field>
7 <field name="model">hr.analytic.timesheet</field>
8 <field name="arch" type="xml">
9 <tree editable="bottom" string="Timesheet Lines">
10 <field name="date" on_change="on_change_date(date)"/>
11 <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
12 <field name="journal_id" invisible="1"/>
14 <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
15 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
16 <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
17 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
18 <field name="amount" sum="Total cost" invisible="1"/>
19 <field name="general_account_id" invisible="1"/>
23 <record id="hr_timesheet_line_form" model="ir.ui.view">
24 <field name="name">hr.analytic.timesheet.form</field>
25 <field name="model">hr.analytic.timesheet</field>
26 <field name="arch" type="xml">
27 <form string="Timesheet Lines" version="7.0">
32 <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
35 <field name="date" on_change="on_change_date(date)"/>
39 <page string="Information">
41 <group string="Product">
42 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
43 <label string="Duration" for="unit_amount"/>
45 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
46 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
49 <group string="Accounting">
50 <field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
51 <field name="amount"/>
52 <field name="general_account_id"/>
53 <field name="journal_id"/>
63 <record id="hr_timesheet_line_search" model="ir.ui.view">
64 <field name="name">hr.analytic.timesheet.search</field>
65 <field name="model">hr.analytic.timesheet</field>
66 <field name="arch" type="xml">
67 <search string="Timesheet">
69 <field name="user_id"/>
70 <field name="account_id"/>
71 <group expand="0" string="Group By...">
72 <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
73 <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
74 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
75 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
81 <record id="account_analytic_account_timesheet_form" model="ir.ui.view">
82 <field name="name">account.analytic.account.invoice.form</field>
83 <field name="model">account.analytic.account</field>
84 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
85 <field name="arch" type="xml">
86 <xpath expr='//separator[@name="project_sep"]' position='replace'>
87 <separator name="project_sep" string="Project Management" colspan="4"/> <!-- removal of invisible attribute -->
89 <xpath expr='//separator[@name="project_sep"]' position='after'>
90 <field name="use_timesheets"/>
95 <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
96 <field name="name">Timesheet Lines</field>
97 <field name="type">ir.actions.act_window</field>
98 <field name="res_model">hr.analytic.timesheet</field>
99 <field name="view_type">form</field>
100 <field name="view_mode">tree,form</field>
101 <field name="context">{"search_default_today":1}</field>
102 <field name="search_view_id" ref="hr_timesheet_line_search"/>
103 <field name="help" type="html">
104 <p class="oe_view_nocontent_create">
105 Click to your timesheets.
107 Through this menu you can register and follow your workings
108 hours by project every day.
113 <menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
115 <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
116 <field name="name">hr.timesheet.employee.extd_form</field>
117 <field name="model">hr.employee</field>
118 <field name="inherit_id" ref="hr.view_employee_form"/>
119 <field name="arch" type="xml">
120 <page string="Personal Information" position="after">
121 <page string="Timesheets" groups="base.group_hr_user">
124 <field name="product_id" domain="[('type','=','service')]"/>
125 <field name="journal_id"/>
133 <menuitem id="menu_hr_timesheet_reports" parent="hr.menu_hr_reporting" sequence="5" name="Timesheet"/>