1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
5 <menuitem id="base.menu_project_management_time_tracking" name="Time Tracking"
6 parent="base.menu_main_pm" sequence="3"/>
8 <record id="hr_timesheet_line_tree" model="ir.ui.view">
9 <field name="name">hr.analytic.timesheet.tree</field>
10 <field name="model">hr.analytic.timesheet</field>
11 <field name="type">tree</field>
12 <field name="arch" type="xml">
13 <tree editable="bottom" string="Timesheet Lines">
14 <field name="date" on_change="on_change_date(date)"/>
15 <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
16 <field name="journal_id" invisible="1"/>
18 <field domain="[('type','=','normal')]" name="account_id"/>
19 <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"/>
20 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time"/>
21 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
22 <field name="amount" sum="Total cost" invisible="1"/>
23 <field name="general_account_id" invisible="1"/>
27 <record id="hr_timesheet_line_form" model="ir.ui.view">
28 <field name="name">hr.analytic.timesheet.form</field>
29 <field name="model">hr.analytic.timesheet</field>
30 <field name="type">form</field>
31 <field name="arch" type="xml">
32 <form string="Timesheet Lines">
33 <group colspan="4" col="6">
35 <field name="user_id" on_change="on_change_user_id(user_id)" required="1" select="1"/>
36 <field name="date" select="1" on_change="on_change_date(date)"/>
38 <notebook colspan="4">
39 <page string="Information">
40 <group colspan="2" col="2">
41 <separator string="Product" colspan="2"/>
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 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
44 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
46 <group colspan="2" col="2">
47 <separator string="Accounting" colspan="2"/>
48 <field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1" groups="base.group_extended"/>
49 <field name="amount"/>
50 <field name="general_account_id"/>
51 <field name="journal_id"/>
53 <group colspan="2" col="2">
54 <separator string="Invoicing" colspan="2"/>
62 <record id="hr_timesheet_line_search" model="ir.ui.view">
63 <field name="name">hr.analytic.timesheet.search</field>
64 <field name="model">hr.analytic.timesheet</field>
65 <field name="type">search</field>
66 <field name="arch" type="xml">
67 <search string="Timesheet">
68 <group col='8' colspan='4'>
69 <filter name="today" icon="terp-go-today" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
70 <separator orientation="vertical"/>
71 <field name="user_id"/>
72 <field name="account_id"/>
76 <group expand="0" string="Group By...">
77 <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
78 <separator orientation="vertical"/>
79 <filter string="Anlytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
80 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
81 <separator orientation="vertical"/>
82 <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
89 <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
90 <field name="name">Working Hours</field>
91 <field name="type">ir.actions.act_window</field>
92 <field name="res_model">hr.analytic.timesheet</field>
93 <field name="view_type">form</field>
94 <field name="view_mode">tree,form</field>
95 <field name="context">{"search_default_user_id":uid, "search_default_today":1}</field>
96 <field name="search_view_id" ref="hr_timesheet_line_search"/>
97 <field name="help">Working Hours allows you to log your working hours by project every day.</field>
100 <menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
101 <menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
103 <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
104 <field name="name">hr.timesheet.employee.extd_form</field>
105 <field name="model">hr.employee</field>
106 <field name="inherit_id" ref="hr.view_employee_form"/>
107 <field name="arch" type="xml">
108 <page string="Categories" position="after">
109 <page string="Timesheets">
110 <field name="product_id" domain="[('type','=','service')]"/>
111 <field name="journal_id" widget="selection"/>