mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Replace custom js by 'target': 'main'
This commit is contained in:
committed by
Hai Lang
parent
439d2bc72c
commit
9ae58438ad
@@ -2,10 +2,7 @@ odoo.define('stock_vertical_lift.vertical_lift', function (require) {
|
||||
"use strict";
|
||||
|
||||
var KanbanRecord = require('web.KanbanRecord');
|
||||
var basicFields = require('web.basic_fields');
|
||||
var field_registry = require('web.field_registry');
|
||||
var FormController = require('web.FormController');
|
||||
var FieldInteger = basicFields.FieldInteger;
|
||||
|
||||
KanbanRecord.include({
|
||||
|
||||
@@ -27,27 +24,6 @@ odoo.define('stock_vertical_lift.vertical_lift', function (require) {
|
||||
|
||||
});
|
||||
|
||||
var ExitButton = FieldInteger.extend({
|
||||
tagName: 'button',
|
||||
className: 'btn btn-danger btn-block btn-lg o_shuttle_exit',
|
||||
events: {
|
||||
'click': '_onClick',
|
||||
},
|
||||
_render: function () {
|
||||
this.$el.text(this.string);
|
||||
},
|
||||
_onClick: function () {
|
||||
// The only reason to have this field widget is to be able
|
||||
// to inject clear_breadcrumbs in the action:
|
||||
// it will revert back to a normal - non-headless - view
|
||||
this.do_action('stock_vertical_lift.vertical_lift_shuttle_action', {
|
||||
clear_breadcrumbs: true,
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
FormController.include({
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
@@ -94,10 +70,7 @@ odoo.define('stock_vertical_lift.vertical_lift', function (require) {
|
||||
|
||||
});
|
||||
|
||||
field_registry.add('vlift_shuttle_exit_button', ExitButton);
|
||||
|
||||
return {
|
||||
ExitButton: ExitButton,
|
||||
};
|
||||
return {};
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user