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="type">tree</field>
9 <field name="arch" type="xml">
10 <tree editable="bottom" string="Timesheet Lines">
11 <field name="date" on_change="on_change_date(date)"/>
12 <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
13 <field name="journal_id" invisible="1"/>
15 <field domain="[('type','=','normal')]" name="account_id"/>
16 <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"/>
17 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
18 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
19 <field name="amount" sum="Total cost" invisible="1"/>
20 <field name="general_account_id" invisible="1"/>
24 <record id="hr_timesheet_line_form" model="ir.ui.view">
25 <field name="name">hr.analytic.timesheet.form</field>
26 <field name="model">hr.analytic.timesheet</field>
27 <field name="type">form</field>
28 <field name="arch" type="xml">
29 <form string="Timesheet Lines">
30 <group colspan="4" col="6">
32 <field name="user_id" on_change="on_change_user_id(user_id)" required="1" select="1"/>
33 <field name="date" select="1" on_change="on_change_date(date)"/>
35 <notebook colspan="4">
36 <page string="Information">
37 <group colspan="2" col="2">
38 <separator string="Product" colspan="2"/>
39 <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')]"/>
40 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
41 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
43 <group colspan="2" col="2">
44 <separator string="Accounting" colspan="2"/>
45 <field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
46 <field name="amount"/>
47 <field name="general_account_id"/>
48 <field name="journal_id"/>
50 <group colspan="2" col="2">
51 <separator string="Invoicing" colspan="2"/>
59 <record id="hr_timesheet_line_search" model="ir.ui.view">
60 <field name="name">hr.analytic.timesheet.search</field>
61 <field name="model">hr.analytic.timesheet</field>
62 <field name="type">search</field>
63 <field name="arch" type="xml">
64 <search string="Timesheet">
66 <filter name="today" icon="terp-go-today" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
67 <separator orientation="vertical"/>
68 <field name="user_id"/>
69 <field name="account_id"/>
73 <group expand="0" string="Group By...">
74 <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
75 <separator orientation="vertical"/>
76 <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
77 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
78 <separator orientation="vertical"/>
79 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
86 <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
87 <field name="name">Timesheet Lines</field>
88 <field name="type">ir.actions.act_window</field>
89 <field name="res_model">hr.analytic.timesheet</field>
90 <field name="view_type">form</field>
91 <field name="view_mode">tree,form</field>
92 <field name="context">{"search_default_today":1}</field>
93 <field name="search_view_id" ref="hr_timesheet_line_search"/>
94 <field name="help">Through this menu you can register and follow your workings hours by project every day.</field>
97 <menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
99 <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
100 <field name="name">hr.timesheet.employee.extd_form</field>
101 <field name="model">hr.employee</field>
102 <field name="inherit_id" ref="hr.view_employee_form"/>
103 <field name="arch" type="xml">
104 <page string="Categories" position="after">
105 <page string="Timesheets" groups="base.group_hr_user">
106 <field name="product_id" domain="[('type','=','service')]"/>
107 <field name="journal_id" widget="selection"/>
108 <field name="uom_id" invisible="1"/>
114 <menuitem id="menu_hr_timesheet_reports" parent="base.menu_hr_reports" sequence="5" name="Timesheet"/>