Files
odoo_source/addons/hr_holidays/data/mail_data.xml
T
TWA 398f0eb8e9 [IMP] hr_holidays: Define notifications by leave type
Purpose
=======

- A manager could want to follow only home working of its own department
- A HR officer could want to follow only sick leaves of all dpts.

We have to improve what people follow and how they follow it in the leaves module

Specifications
==============

Subtype on department
---------------------

In department form view, right now, people can follow approvals

Instead we should have some generic and specific subtypes depending on the leave type

For instance, a HR Officer wants to follow only sick leaves and a manager only home working

Following mechanism
-------------------

Remove first / second approval subtype differences
if a leave type is not linked to a specific subtype, consider only classic
people follow it (employee and assigned HR people / manager)

Link leave type to subtypes, with some by default (i.e. home working, ...), not mandatory

When creating a leave type, link it to the department to be able to
activate the subtype for only one department.
2018-10-19 07:52:41 +00:00

57 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Leave specific activities -->
<record id="mail_act_leave_approval" model="mail.activity.type">
<field name="name">Leaves Approval</field>
<field name="icon">fa-sun-o</field>
<field name="res_model_id" ref="hr_holidays.model_hr_leave"/>
</record>
<record id="mail_act_leave_second_approval" model="mail.activity.type">
<field name="name">Leaves Second Approve</field>
<field name="icon">fa-sun-o</field>
<field name="res_model_id" ref="hr_holidays.model_hr_leave"/>
</record>
<!-- Leave specific activities -->
<record id="mail_act_leave_allocation_approval" model="mail.activity.type">
<field name="name">Allocation Approval</field>
<field name="icon">fa-sun-o</field>
<field name="res_model_id" ref="hr_holidays.model_hr_leave_allocation"/>
</record>
<record id="mail_act_leave_allocation_second_approval" model="mail.activity.type">
<field name="name">Allocation Second Approve</field>
<field name="icon">fa-sun-o</field>
<field name="res_model_id" ref="hr_holidays.model_hr_leave_allocation"/>
</record>
<!-- Holidays-related subtypes for messaging / Chatter -->
<record id="mt_leave" model="mail.message.subtype">
<field name="name">Leave</field>
<field name="res_model">hr.leave</field>
<field name="description">Leave Request</field>
</record>
<record id="mt_leave_home_working" model="mail.message.subtype">
<field name="name">Home Working</field>
<field name="res_model">hr.leave</field>
<field name="description">Home Working</field>
</record>
<record id="mt_leave_sick" model="mail.message.subtype">
<field name="name">Sick Leave</field>
<field name="res_model">hr.leave</field>
<field name="description">Sick Leave</field>
</record>
<record id="mt_leave_unpaid" model="mail.message.subtype">
<field name="name">Unpaid Leave</field>
<field name="res_model">hr.leave</field>
<field name="description">Unpaid Leave</field>
</record>
<!-- Allocation-related subtypes for messaging / Chatter -->
<record id="mt_leave_allocation" model="mail.message.subtype">
<field name="name">Allocation</field>
<field name="res_model">hr.leave.allocation</field>
<field name="description">Allocation Request</field>
</record>
</data>
</odoo>