Merge branch 'master' of https://github.com/odoo/odoo
[odoo/odoo.git] / addons / hr_timesheet_sheet / hr_timesheet_sheet_data.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data noupdate="1">
4         <!-- notify all employees of module installation -->
5         <record model="mail.message" id="hr_timesheet_module_install_notification">
6             <field name="model">mail.group</field>
7             <field name="res_id" ref="mail.group_all_employees"/>
8             <field name="type">notification</field>
9             <field name="subtype_id" ref="mail.mt_comment"/>
10             <field name="subject">Timesheet Validation application installed!</field>
11             <field name="body"><![CDATA[<p>From the top menu "Human Resources", enter and validate timesheets and attendances.</p>]]></field>
12         </record>
13
14         <record id="ir_actions_server_timsheet_sheet" model="ir.actions.server">
15             <field name="sequence" eval="5"/>
16             <field name="state">code</field>
17             <field name="type">ir.actions.server</field>
18             <field name="model_id" ref="model_hr_timesheet_current_open"/>
19             <field name="code">action = pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, None, context)</field>
20             <field name="condition">True</field>
21             <field name="name">My Timesheet</field>
22         </record>
23
24         <menuitem name="My Current Timesheet" id="menu_act_hr_timesheet_sheet_form_my_current" parent="hr_attendance.menu_hr_time_tracking" action="ir_actions_server_timsheet_sheet" sequence="1"/>
25
26         <!-- Timesheet sheet related subtypes for messaging / Chatter -->
27         <record id="mt_timesheet_confirmed" model="mail.message.subtype">
28             <field name="name">Waiting Approval</field>
29             <field name="res_model">hr_timesheet_sheet.sheet</field>
30             <field name="default" eval="True"/>
31             <field name="description">waiting approval</field>
32         </record>
33         <record id="mt_timesheet_approved" model="mail.message.subtype">
34             <field name="name">Approved</field>
35             <field name="res_model">hr_timesheet_sheet.sheet</field>
36             <field name="default" eval="True"/>
37             <field name="description">Timesheet approved</field>
38         </record>
39         <!-- Department (Parent) related subtypes for messaging / Chatter -->
40         <record id="mt_department_timesheet_confirmed" model="mail.message.subtype">
41             <field name="name">Timesheets to Approve</field>
42             <field name="res_model">hr.department</field>
43             <field name="default" eval="False"/>
44             <field name="parent_id" eval="ref('mt_timesheet_confirmed')"/>
45             <field name="relation_field">department_id</field>
46             <field name="sequence" eval="5"/>
47         </record>
48          <record id="mt_department_timesheet_approved" model="mail.message.subtype">
49             <field name="name">Timesheets Approved</field>
50             <field name="res_model">hr.department</field>
51             <field name="default" eval="False"/>
52             <field name="parent_id" eval="ref('mt_timesheet_approved')"/>
53             <field name="relation_field">department_id</field>
54             <field name="sequence" eval="5"/>
55         </record>
56
57     </data>
58 </openerp>