[IMP] hr_work_entry_holidays: Remove enterprise features
Before this commit, the hr_work_entry_holidays had remaining enterprise views. These views are now provided by the hr_work_entry_holidays_enterprise module. taskid: 2222790
This commit is contained in:
@@ -17,8 +17,6 @@ This application allows you to integrate time off in payslips.
|
||||
'depends': ['hr_holidays', 'hr_work_entry_contract'],
|
||||
'data': [
|
||||
'views/hr_leave_views.xml',
|
||||
'views/hr_work_entry_views.xml',
|
||||
'data/hr_payroll_holidays_data.xml',
|
||||
],
|
||||
'demo': ['data/hr_payroll_holidays_demo.xml'],
|
||||
'installable': True,
|
||||
|
||||
@@ -38,31 +38,5 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_leave_work_entry_action" model="ir.actions.act_window">
|
||||
<field name="name">All Time Off</field>
|
||||
<field name="res_model">hr.leave</field>
|
||||
<field name="view_mode">tree,kanban,form,calendar,activity,gantt</field>
|
||||
<field name="search_view_id" ref="hr_leave_view_search_manager_inherit_work_entry"/>
|
||||
<field name="view_id" ref="hr_leave_view_tree_inherit_work_entry"/>
|
||||
<field name="context">{
|
||||
'search_default_gray':1,
|
||||
'hide_employee_name': 1
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Meet the time off dashboard.
|
||||
</p><p>
|
||||
A great way to keep track on employee’s PTOs, sick days, and approval status.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_work_entry_leave_to_approve"
|
||||
name="Time Off to Report"
|
||||
action="hr_leave_work_entry_action"
|
||||
parent="hr_work_entry_contract.menu_hr_payroll_work_entries_root"
|
||||
sequence="75"
|
||||
groups="hr_holidays.group_hr_holidays_user"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="payroll_hr_work_entry_view_form_inherit" model="ir.ui.view">
|
||||
<field name="name">payroll.hr.work.entry.view.form.inherit</field>
|
||||
<field name="model">hr.work.entry</field>
|
||||
<field name="inherit_id" ref="hr_work_entry.hr_work_entry_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='state']" position="before">
|
||||
<field name="leave_state" invisible="1"/>
|
||||
<button string="Refuse Time Off" name="action_refuse_leave" type="object" attrs="{'invisible': ['|', ('state', '!=', 'conflict'), ('leave_id', '=', False)]}"/>
|
||||
<button string="Approve Time Off" name="action_approve_leave" type="object" attrs="{'invisible': ['|', '|', ('state', '!=', 'conflict'), ('leave_id', '=', False), ('leave_state', '=', 'validate')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='work_entry_type_id']" position="after">
|
||||
<field name="leave_id" attrs="{'invisible': [('leave_id', '=', False)]}"/>
|
||||
<field name="contract_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="payroll_hr_work_entry_view_form_inherit_contract" model="ir.ui.view">
|
||||
<field name="name">payroll.hr.work.entry.view.form.inherit.contract</field>
|
||||
<field name="model">hr.work.entry</field>
|
||||
<field name="inherit_id" ref="hr_work_entry_contract.hr_work_entry_contract_view_form_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='work_entry_undefined']" position="after">
|
||||
<div attrs="{'invisible': [('work_entry_type_id', '=', False)]}">
|
||||
<div class="alert alert-warning mb-0" role="alert" attrs="{'invisible': [('leave_id', '=', False)]}">
|
||||
This work entry cannot be validated. There is a leave to approve (or refuse) at the same time.
|
||||
</div>
|
||||
<div class="alert alert-warning mb-0" role="alert" attrs="{'invisible': ['!', ('leave_id', '=', False)]}">
|
||||
This work entry cannot be validated. It is conflicting with at least one work entry. <br/>
|
||||
Two work entries of the same employee cannot overlap at the same time.
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="payroll_leave_hr_work_entry_type_view_form_inherit" model="ir.ui.view">
|
||||
<field name="name">payroll.leave.hr.work.entry.type.view.form.inherit</field>
|
||||
<field name="model">hr.work.entry.type</field>
|
||||
<field name="inherit_id" ref="hr_work_entry.hr_work_entry_type_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='sequence']" position="after">
|
||||
<field name="leave_type_ids" widget="many2many_tags" attrs="{'invisible': [('is_leave', '=', False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user