Purpose ======= Have a clear distinction between leave and allocation requests instead of using the same model to mix 2 different concepts. Splitting the model will allow different business code to be run on each model as allocations and leaves are not exactly the same thing; this will add some code but simplify future improvements Specification ============= 1/ Completely separate the models Model hr.holidays has been split into leave.request and leave.allocation. 2/ Make reporting working again by using an SQL view aggregating data from leaves and allocations A new report has been added in order to aggregate datas from both allocations and requests. The views have been modified accordingly.
19 lines
1.0 KiB
XML
19 lines
1.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="hr_holiday_status_view_form_inherit" model="ir.ui.view">
|
|
<field name="name">hr.leave.type.form</field>
|
|
<field name="model">hr.leave.type</field>
|
|
<field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//group[@name='description']" position="after">
|
|
<group name="timesheet" string="Timesheet">
|
|
<field name="timesheet_generate"/>
|
|
<field name="timesheet_project_id" attrs="{'invisible': [('timesheet_generate', '!=', True)], 'required': [('timesheet_generate', '=', True)]}" context="{'active_test': False}" groups="base.group_no_one"/>
|
|
<field name="timesheet_task_id" attrs="{'invisible': [('timesheet_generate', '!=', True)], 'required': [('timesheet_generate', '=', True)]}" context="{'active_test': False}" groups="base.group_no_one"/>
|
|
</group>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo> |