mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_vertical_lift: black, isort, prettier
This commit is contained in:
1
setup/stock_vertical_lift/odoo/addons/stock_vertical_lift
Symbolic link
1
setup/stock_vertical_lift/odoo/addons/stock_vertical_lift
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../stock_vertical_lift
|
||||
6
setup/stock_vertical_lift/setup.py
Normal file
6
setup/stock_vertical_lift/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
@@ -36,7 +36,9 @@ class VerticalLiftOperationInventory(models.Model):
|
||||
lambda self: self.select_next_inventory_line(),
|
||||
),
|
||||
self.Transition(
|
||||
"quantity", "save", lambda self: self._has_identical_quantity(),
|
||||
"quantity",
|
||||
"save",
|
||||
lambda self: self._has_identical_quantity(),
|
||||
),
|
||||
self.Transition(
|
||||
"quantity",
|
||||
|
||||
@@ -138,7 +138,6 @@ class VerticalLiftShuttle(models.Model):
|
||||
|
||||
This method does nothing, override to match your communication
|
||||
protocol."""
|
||||
pass
|
||||
|
||||
def _operation_for_mode(self):
|
||||
model = self._model_for_mode[self.mode]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
odoo.define("stock_vertical_lift.vertical_lift", function (require) {
|
||||
"use strict";
|
||||
|
||||
var KanbanRecord = require("web.KanbanRecord");
|
||||
var FormController = require("web.FormController");
|
||||
|
||||
KanbanRecord.include({
|
||||
_openRecord: function() {
|
||||
_openRecord: function () {
|
||||
if (
|
||||
this.modelName === "vertical.lift.shuttle" &&
|
||||
this.$el.hasClass("open_shuttle_screen")
|
||||
@@ -15,7 +15,7 @@ odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
method: "action_open_screen",
|
||||
model: self.modelName,
|
||||
args: [self.id],
|
||||
}).then(function(action) {
|
||||
}).then(function (action) {
|
||||
self.trigger_up("do_action", {action: action});
|
||||
});
|
||||
} else {
|
||||
@@ -25,7 +25,7 @@ odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
});
|
||||
|
||||
FormController.include({
|
||||
init: function() {
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
if (this.modelName.startsWith("vertical.lift.operation.")) {
|
||||
this.call("bus_service", "addChannel", "notify_vertical_lift_screen");
|
||||
@@ -39,9 +39,9 @@ odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
this.call("bus_service", "startPolling");
|
||||
}
|
||||
},
|
||||
vlift_bus_notification: function(notifications) {
|
||||
vlift_bus_notification: function (notifications) {
|
||||
var self = this;
|
||||
_.each(notifications, function(notification) {
|
||||
_.each(notifications, function (notification) {
|
||||
var channel = notification[0];
|
||||
var message = notification[1];
|
||||
if (channel === "notify_vertical_lift_screen") {
|
||||
@@ -53,7 +53,7 @@ odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
}
|
||||
});
|
||||
},
|
||||
vlift_bus_action_refresh: function(params) {
|
||||
vlift_bus_action_refresh: function (params) {
|
||||
var selectedIds = this.getSelectedIds();
|
||||
if (!selectedIds.length) {
|
||||
return;
|
||||
@@ -63,7 +63,7 @@ odoo.define("stock_vertical_lift.vertical_lift", function(require) {
|
||||
this.reload();
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
destroy: function () {
|
||||
if (this.modelName.startsWith("vertical.lift.operation.")) {
|
||||
this.call(
|
||||
"bus_service",
|
||||
|
||||
Reference in New Issue
Block a user