This commit prepares some cleaning in various hr-related modules that are about to land in master. There are mainly improvements on subtypes. The subtypes are now linked to department subtypes, allowing to follow some records based on the department (like project/task/issue).
59 lines
3.1 KiB
XML
59 lines
3.1 KiB
XML
<?xml version="1.0" ?>
|
|
<openerp>
|
|
<data noupdate="1">
|
|
<!-- notify all employees of module installation -->
|
|
<record model="mail.message" id="hr_timesheet_module_install_notification">
|
|
<field name="model">mail.group</field>
|
|
<field name="res_id" ref="mail.group_all_employees"/>
|
|
<field name="type">notification</field>
|
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
|
<field name="subject">Timesheet Validation application installed!</field>
|
|
<field name="body"><![CDATA[<p>From the top menu "Human Resources", enter and validate timesheets and attendances.</p>]]></field>
|
|
</record>
|
|
|
|
<record id="ir_actions_server_timsheet_sheet" model="ir.actions.server">
|
|
<field name="sequence" eval="5"/>
|
|
<field name="state">code</field>
|
|
<field name="type">ir.actions.server</field>
|
|
<field name="model_id" ref="model_hr_timesheet_current_open"/>
|
|
<field name="code">action = pool.get('hr.timesheet.current.open').open_timesheet(cr, uid, None, context)</field>
|
|
<field name="condition">True</field>
|
|
<field name="name">My Timesheet</field>
|
|
</record>
|
|
|
|
<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"/>
|
|
|
|
<!-- Timesheet sheet related subtypes for messaging / Chatter -->
|
|
<record id="mt_timesheet_confirmed" model="mail.message.subtype">
|
|
<field name="name">Waiting Approval</field>
|
|
<field name="res_model">hr_timesheet_sheet.sheet</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="description">waiting approval</field>
|
|
</record>
|
|
<record id="mt_timesheet_approved" model="mail.message.subtype">
|
|
<field name="name">Approved</field>
|
|
<field name="res_model">hr_timesheet_sheet.sheet</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="description">Timesheet approved</field>
|
|
</record>
|
|
<!-- Department (Parent) related subtypes for messaging / Chatter -->
|
|
<record id="mt_department_timesheet_confirmed" model="mail.message.subtype">
|
|
<field name="name">Timesheets to Approve</field>
|
|
<field name="res_model">hr.department</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="parent_id" eval="ref('mt_timesheet_confirmed')"/>
|
|
<field name="relation_field">department_id</field>
|
|
<field name="sequence" eval="5"/>
|
|
</record>
|
|
<record id="mt_department_timesheet_approved" model="mail.message.subtype">
|
|
<field name="name">Timesheets Approved</field>
|
|
<field name="res_model">hr.department</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="parent_id" eval="ref('mt_timesheet_approved')"/>
|
|
<field name="relation_field">department_id</field>
|
|
<field name="sequence" eval="5"/>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|