[MERGE] merge with main trunk addons branch
[odoo/odoo.git] / addons / hr_timesheet_sheet / board_hr_timesheet_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4     <menuitem id="base.menu_hr_dasboard" name="Dashboard" parent="hr.menu_hr_reporting" sequence="0" groups="base.group_system,base.group_hr_manager,base.group_hr_user"/>
5     <menuitem
6             action="hr.open_board_hr"
7             icon="terp-graph"
8             id="base.menu_hr_project"
9             parent="base.menu_hr_dasboard"
10             sequence="4"/>
11
12     <record id="action_timesheet_report_all" model="ir.actions.act_window">
13             <field name="name">Timesheets by Month</field>
14             <field name="type">ir.actions.act_window</field>
15             <field name="res_model">timesheet.report</field>
16             <field name="view_type">form</field>
17             <field name="view_mode">graph,tree</field>
18             <field name="domain">[('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]</field>
19             <field name="view_id" ref="hr_timesheet_sheet.view_timesheet_report_graph"/>
20         </record>
21
22         <record id="action_hr_timesheet_sheet_graph" model="ir.actions.act_window">
23             <field name="name">Timesheets</field>
24             <field name="type">ir.actions.act_window</field>
25             <field name="res_model">hr_timesheet_sheet.sheet</field>
26             <field name="view_type">form</field>
27             <field name="view_mode">graph,tree</field>
28             <field name="view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_graph"/>
29         </record>
30
31         <record id="view_employee_attendance_graph" model="ir.ui.view">
32             <field name="name">Employee Attendance Graph</field>
33             <field name="model">timesheet.report</field>
34             <field name="type">graph</field>
35             <field name="arch" type="xml">
36                 <graph string="Employee Attendances" type="bar">
37                     <field name="user_id" />
38                     <field name="total_attendance" operator="+"/>
39                     <field name="total_timesheet" operator="+"/>
40                 </graph>
41             </field>
42         </record>
43
44         <record id="action_employee_attendance_graph" model="ir.actions.act_window">
45             <field name="name">Employee Attendance Graph</field>
46             <field name="res_model">timesheet.report</field>
47             <field name="view_type">form</field>
48             <field name="view_mode">graph</field>
49             <field name="view_id" ref="view_employee_attendance_graph"/>
50         </record>
51
52         <record id="board_hr_timesheet_form" model="ir.ui.view">
53             <field name="name">board.hr.timesheet.form</field>
54             <field name="model">board.board</field>
55             <field name="inherit_id" ref="hr.board_hr_form"/>
56             <field name="type">form</field>
57             <field name="arch" type="xml">
58                 <xpath expr="/form/hpaned/child2" position="inside">
59                     <action colspan="4" height="220" name="%(action_employee_attendance_graph)d" string="Employee Attendances" />
60                 </xpath>
61             </field>
62         </record>
63
64         <record id="hr_timesheet_sheet_tree" model="ir.ui.view">
65             <field name="name">hr.timesheet.sheet.tree.simplified.board</field>
66             <field name="model">hr_timesheet_sheet.sheet</field>
67             <field name="type">tree</field>
68             <field name="arch" type="xml">
69                 <tree colors="blue:state in ('draft');black:state in ('confirm','new');gray:state in('done')" string="Timesheets">
70                     <field name="date_from"/>
71                     <field name="user_id"/>
72                     <field name="department_id" invisible="1"/>
73                     <field name="name"/>
74                     <field name="total_attendance"/>
75                     <field name="total_timesheet"/>
76                     <field name="state"/>
77                 </tree>
78             </field>
79         </record>
80     </data>
81 </openerp>