1 <?xml version="1.0" encoding="utf-8"?>
4 <record id="hr_timesheet_line_tree" model="ir.ui.view">
5 <field name="name">hr.analytic.timesheet.tree</field>
6 <field name="model">hr.analytic.timesheet</field>
7 <field name="type">tree</field>
8 <field name="arch" type="xml">
9 <tree editable="bottom" string="Timesheet Line">
10 <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
12 <field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id"/>
14 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" sum="Total time"/>
15 <field name="product_id" required="1" domain="[('type','=','service')]"/>
16 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
17 <field name="amount" sum="Total cost"/>
18 <field name="general_account_id"/>
22 <record id="hr_timesheet_line_form" model="ir.ui.view">
23 <field name="name">hr.analytic.timesheet.form</field>
24 <field name="model">hr.analytic.timesheet</field>
25 <field name="type">form</field>
26 <field name="arch" type="xml">
27 <form string="Timesheet Lines">
28 <field colspan="4" name="name"/>
29 <field name="user_id" on_change="on_change_user_id(user_id)" required="1" select="1"/>
30 <field name="date" select="1"/>
31 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
33 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/>
34 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
36 <field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" select="1"/>
37 <field name="amount" select="2"/>
38 <field name="general_account_id" select="2"/>
39 <field name="journal_id"/>
43 <menuitem id="menu_act_hr_timesheet_line_today_form" parent="hr.menu_hr_root" name="Working Hours" />
45 <record id="act_hr_timesheet_line_me_all_form" model="ir.actions.act_window">
46 <field name="name">My Working Hours</field>
47 <field name="type">ir.actions.act_window</field>
48 <field name="res_model">hr.analytic.timesheet</field>
49 <field name="view_type">form</field>
50 <field name="view_mode">tree,form</field>
51 <field name="domain">[('user_id','=',uid)]</field>
53 <menuitem action="act_hr_timesheet_line_me_all_form" id="menu_act_hr_timesheet_line_me_all_form" parent="hr_timesheet.menu_act_hr_timesheet_line_today_form"/>
55 <record id="act_hr_timesheet_line_evry1_today_form_my" model="ir.actions.act_window">
56 <field name="name">My Working Hours of The Day</field>
57 <field name="type">ir.actions.act_window</field>
58 <field name="res_model">hr.analytic.timesheet</field>
59 <field name="view_type">form</field>
60 <field name="view_mode">tree,form</field>
61 <field name="domain">[('user_id','=',uid),('date', '=',time.strftime('%Y-%m-%d'))]</field>
63 <menuitem action="act_hr_timesheet_line_evry1_today_form_my" id="menu_act_hr_timesheet_line_evry1_today_form_my" parent="menu_act_hr_timesheet_line_me_all_form"/>
66 <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
67 <field name="name">Working Hours</field>
68 <field name="type">ir.actions.act_window</field>
69 <field name="res_model">hr.analytic.timesheet</field>
70 <field name="view_type">form</field>
71 <field name="view_mode">tree,form</field>
74 action="act_hr_timesheet_line_evry1_all_form"
75 id="menu_act_hr_timesheet_line_evry1_all_form"
76 parent="hr_timesheet.menu_act_hr_timesheet_line_today_form"
77 groups="hr.group_hr_manager"/>
79 <record id="act_hr_timesheet_line_evry1_today_form" model="ir.actions.act_window">
80 <field name="name">Working Hours of The Day</field>
81 <field name="type">ir.actions.act_window</field>
82 <field name="res_model">hr.analytic.timesheet</field>
83 <field name="view_type">form</field>
84 <field name="view_mode">tree,form</field>
85 <field name="domain">[('date', '=', time.strftime('%Y-%m-%d'))]</field>
87 <menuitem action="act_hr_timesheet_line_evry1_today_form" id="menu_act_hr_timesheet_line_evry1_today_form" parent="menu_act_hr_timesheet_line_evry1_all_form"/>
89 <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
90 <field name="name">hr.timesheet.employee.extd_form</field>
91 <field name="model">hr.employee</field>
92 <field name="inherit_id" ref="hr.view_employee_form"/>
93 <field name="arch" type="xml">
94 <notebook position="inside">
95 <page string="Timesheets">
96 <field name="product_id" domain="[('type','=','service')]"/>
97 <field name="journal_id"/>