[IMP] hr_contract: remove unused code

In the hr_contract_history list view, some owl code was set to
allow employee creation from that view. Since the create button
has been removed, that code was unused.

closes odoo/odoo#106264

Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Dossogne Bertrand
2022-11-22 18:12:31 +01:00
parent 07abacb4d8
commit 2415338d46
3 changed files with 0 additions and 37 deletions
@@ -139,7 +139,6 @@
<field name="model">hr.contract.history</field>
<field name="arch" type="xml">
<tree string="Contracts"
js_class="hr_contract_history_list"
default_order = 'is_under_contract, date_start desc'
edit="false"
delete="false"
@@ -1,24 +0,0 @@
/** @odoo-module **/
import { useService } from "@web/core/utils/hooks";
import { ListController } from "@web/views/list/list_controller";
export class HrContractHistoryListController extends ListController {
setup() {
super.setup();
this.actionService = useService('action');
}
/**
* @override
*/
async createRecord({ group } = {}) {
this.actionService.doAction({
name: this.env._t('New Employee'),
type: 'ir.actions.act_window',
res_model: 'hr.employee',
views: [[false, 'form']],
view_mode: 'form',
});
}
}
@@ -1,12 +0,0 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { listView } from "@web/views/list/list_view";
import { HrContractHistoryListController } from "./hr_contract_history_list_controller";
export const HrContractHistoryView = {
...listView,
Controller: HrContractHistoryListController,
}
registry.category("views").add('hr_contract_history_list', HrContractHistoryView);