[IMP] hr_contract,hr_work_entry_contract: remove enterprise features

Before this commit, the hr_work_entry_contract contained enterprise views/features that could not be integrated in community.
These features are now provided by the hr_work_entry_contract_enterprise module.

taskid: 2222790
This commit is contained in:
Arnaud Joset
2021-02-26 08:42:24 +01:00
parent baa4dde1bb
commit 7f126cec5d
7 changed files with 1 additions and 143 deletions
@@ -303,12 +303,4 @@
parent="hr.menu_human_resources_configuration"
sequence="3"/>
<menuitem
id="hr_menu_contract"
name="All Contracts"
action="action_hr_contract"
parent="hr.menu_hr_employee_payroll"
sequence="6"
groups="hr_contract.group_hr_contract_manager"/>
</odoo>
@@ -20,7 +20,6 @@
'views/hr_work_entry_template.xml',
'views/hr_work_entry_views.xml',
'views/resource_views.xml',
'views/hr_payroll_menu.xml',
'wizard/hr_work_entry_regeneration_wizard_views.xml',
],
'demo': [
@@ -1,7 +1,7 @@
# -*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo import fields, models
class HrEmployee(models.Model):
@@ -1,41 +0,0 @@
odoo.define('hr_work_entry_contract.work_entries_gantt', function(require) {
'use strict';
var WorkEntryControllerMixin = require('hr_work_entry_contract.WorkEntryControllerMixin');
var GanttView = require('web_gantt.GanttView');
var GanttController = require('web_gantt.GanttController');
var viewRegistry = require('web.view_registry');
var WorkEntryGanttController = GanttController.extend(WorkEntryControllerMixin, {
events: _.extend({}, WorkEntryControllerMixin.events, GanttController.prototype.events),
_renderButtonsQWeb: function() {
return this._super.apply(this, arguments).append(this._renderWorkEntryButtons());
},
_fetchRecords: function () {
return this.model.ganttData.records;
},
_fetchFirstDay: function () {
return this.model.ganttData.startDate;
},
_fetchLastDay: function () {
return this.model.ganttData.stopDate;
},
_displayWarning: function ($warning) {
this.$('.o_gantt_view').before($warning);
},
});
var WorkEntryGanttView = GanttView.extend({
config: _.extend({}, GanttView.prototype.config, {
Controller: WorkEntryGanttController,
}),
});
viewRegistry.add('work_entries_gantt', WorkEntryGanttView);
return WorkEntryGanttController;
});
@@ -1,54 +0,0 @@
<?xml version='1.0' encoding='UTF-8' ?>
<odoo>
<!-- Root Menus -->
<menuitem id="menu_hr_payroll_root" name="Payroll" sequence="45" web_icon="hr_payroll,static/description/icon.png"/>
<menuitem
id="menu_hr_payroll_work_entries_root"
name="Work Entries"
parent="menu_hr_payroll_root"
sequence="60"
groups="hr.group_hr_user"/>
<menuitem
id="menu_hr_payroll_configuration"
name="Configuration"
parent="menu_hr_payroll_root"
sequence="100"
groups="hr.group_hr_user"/>
<!-- **** Work Entries **** -->
<menuitem
id="menu_work_entry"
name="Work Entries"
action="hr_work_entry.hr_work_entry_action"
parent="menu_hr_payroll_work_entries_root"
sequence="25"/>
<menuitem
id="menu_work_entry_conflicts"
name="Conflicts"
action="hr_work_entry.hr_work_entry_action_conflict"
parent="menu_hr_payroll_work_entries_root"
sequence="50"/>
<!-- Work entries Configuration -->
<menuitem
id="menu_hr_work_entry_confirguration"
name="Work Entries"
parent="menu_hr_payroll_configuration"
sequence="50"
/>
<menuitem
id="menu_hr_work_entry_type_view"
action="hr_work_entry.hr_work_entry_type_action"
parent="menu_hr_work_entry_confirguration"
/>
<menuitem
id="menu_resource_calendar_view"
action="resource.action_resource_calendar_form"
parent="menu_hr_work_entry_confirguration"
/>
</odoo>
@@ -5,7 +5,6 @@
<xpath expr="script[last()]" position="after">
<script type="text/javascript" src="/hr_work_entry_contract/static/src/js/work_entries_controller_mixin.js"></script>
<script type="text/javascript" src="/hr_work_entry_contract/static/src/js/work_entries_calendar.js"></script>
<script type="text/javascript" src="/hr_work_entry_contract/static/src/js/work_entries_gantt.js"></script>
</xpath>
</template>
@@ -1,18 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_work_entry_action_view_gantt" model="ir.actions.act_window.view">
<field name="sequence" eval="2"/>
<field name="view_mode">gantt</field>
<field name="act_window_id" ref="hr_work_entry.hr_work_entry_action"/>
</record>
<record id="hr_work_entry_action_conflict_view_gantt" model="ir.actions.act_window.view">
<field name="sequence" eval="2"/>
<field name="view_mode">gantt</field>
<field name="act_window_id" ref="hr_work_entry.hr_work_entry_action_conflict"/>
</record>
<record id="hr_work_entry_contract_view_calendar_inherit" model="ir.ui.view">
<field name="name">hr.work.entry.contract.view.calendar.inherit</field>
<field name="model">hr.work.entry</field>
@@ -24,30 +11,6 @@
</field>
</record>
<record id="hr_work_entry_gantt" model="ir.ui.view">
<field name="name">hr.work.entry.gantt</field>
<field name="model">hr.work.entry</field>
<field name="arch" type="xml">
<gantt js_class="work_entries_gantt"
string="Work Entries"
date_start="date_start"
date_stop="date_stop"
color="color"
default_group_by='employee_id'
decoration-secondary="state == 'validated'"
decoration-warning="state == 'conflict'"
scales="day,week,month"
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day:half'}"
plan="0"
sample="1">
<field name="color" invisible="1"/>
<field name="state"/>
<field name="employee_id"/>
<field name="name"/>
</gantt>
</field>
</record>
<record id="hr_work_entry_contract_view_form_inherit" model="ir.ui.view">
<field name="name">hr.work.entry.contract.view.form.inherit</field>
<field name="model">hr.work.entry</field>