Files
odoo_source/addons/hr_holidays/data/hr_holidays_data.xml
T
Barad Mahendra 51399445a3 [IMP] hr_holidays: support document on Time Off based on Time Off type
Currently, it's possible to add supporting documents on the chatter of
the time off. But it's not easy to use and doesn't make really sense.
So we will add the possibility to add it more easily.

So in this commit,
 - Added 'Supporting Document' on Time Off type to support the
attachment based on types.
 - On new Time Off, if the Time Off type has a support document then allow
uploading the supporting document in form view.
 - The File is recorded on the chatter of the Time Off request.
 - There will be synchronization between chatter and form attahcments.

PS: added non-stored m2m field to display the attachment view(m2m_binary)
in the form view as o2m does not support it.

TaskID: 2431478
2021-04-13 13:38:31 +00:00

56 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Casual leave -->
<record id="holiday_status_cl" model="hr.leave.type">
<field name="name">Paid Time Off</field>
<field name="allocation_type">fixed</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">both</field>
<field name="color_name">black</field>
<field name="leave_notif_subtype_id" ref="mt_leave"/>
<field name="allocation_notif_subtype_id" ref="mt_leave_allocation"/>
<field name="validity_start" eval="time.strftime('%Y-%m-01')"/>
<field name="responsible_id" ref="base.user_admin"/>
</record>
<!-- Sick leave -->
<record id="holiday_status_sl" model="hr.leave.type">
<field name="name">Sick Time Off</field>
<field name="allocation_type">no</field>
<field name="color_name">red</field>
<field name="validity_start" eval="time.strftime('%Y-01-01')"/>
<field name="leave_notif_subtype_id" ref="mt_leave_sick"/>
<field name="responsible_id" ref="base.user_admin"/>
<field name="support_document">True</field>
</record>
<!-- Compensatory Days -->
<record id="holiday_status_comp" model="hr.leave.type">
<field name="name">Compensatory Days</field>
<field name="allocation_type">fixed_allocation</field>
<field name="leave_validation_type">manager</field>
<field name="allocation_validation_type">manager</field>
<field name="request_unit">hour</field>
<field name="color_name">lavender</field>
<field name="validity_start" eval="False"/>
<field name="leave_notif_subtype_id" ref="mt_leave"/>
<field name="responsible_id" ref="base.user_admin"/>
</record>
<!--Unpaid Leave -->
<record id="holiday_status_unpaid" model="hr.leave.type">
<field name="name">Unpaid</field>
<field name="allocation_type">no</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">both</field>
<field name="color_name">brown</field>
<field name="request_unit">hour</field>
<field name="unpaid" eval="True"/>
<field name="validity_start" eval="time.strftime('%Y-01-01')"/>
<field name="leave_notif_subtype_id" ref="mt_leave_unpaid"/>
<field name="responsible_id" ref="base.user_admin"/>
</record>
</data>
</odoo>