From 333e06a7f55ffcb5000bffdcf123496965df233f Mon Sep 17 00:00:00 2001 From: Arnaud Joset <arj@odoo.com> Date: Wed, 17 Feb 2021 14:57:03 +0100 Subject: [PATCH] [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 --- addons/hr_work_entry_holidays/__manifest__.py | 2 - .../views/hr_leave_views.xml | 26 ---------- .../views/hr_work_entry_views.xml | 50 ------------------- 3 files changed, 78 deletions(-) delete mode 100644 addons/hr_work_entry_holidays/views/hr_work_entry_views.xml diff --git a/addons/hr_work_entry_holidays/__manifest__.py b/addons/hr_work_entry_holidays/__manifest__.py index 17a48e1628b7..c703b9a07cd4 100644 --- a/addons/hr_work_entry_holidays/__manifest__.py +++ b/addons/hr_work_entry_holidays/__manifest__.py @@ -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, diff --git a/addons/hr_work_entry_holidays/views/hr_leave_views.xml b/addons/hr_work_entry_holidays/views/hr_leave_views.xml index 18a16a50e88f..ecd131cd006b 100644 --- a/addons/hr_work_entry_holidays/views/hr_leave_views.xml +++ b/addons/hr_work_entry_holidays/views/hr_leave_views.xml @@ -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> diff --git a/addons/hr_work_entry_holidays/views/hr_work_entry_views.xml b/addons/hr_work_entry_holidays/views/hr_work_entry_views.xml deleted file mode 100644 index 203560628e53..000000000000 --- a/addons/hr_work_entry_holidays/views/hr_work_entry_views.xml +++ /dev/null @@ -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> -- GitLab