diff --git a/stock_vertical_lift/__manifest__.py b/stock_vertical_lift/__manifest__.py
index f0860072727f..84b26b75926c 100644
--- a/stock_vertical_lift/__manifest__.py
+++ b/stock_vertical_lift/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Vertical Lift",
"summary": "Provides the core for integration with Vertical Lifts",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Stock",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/stock_vertical_lift/demo/product_demo.xml b/stock_vertical_lift/demo/product_demo.xml
index 0f59a88a315b..e372bb10050e 100644
--- a/stock_vertical_lift/demo/product_demo.xml
+++ b/stock_vertical_lift/demo/product_demo.xml
@@ -13,7 +13,6 @@
none
-
@@ -28,7 +27,6 @@
none
-
diff --git a/stock_vertical_lift/demo/stock_inventory_demo.xml b/stock_vertical_lift/demo/stock_inventory_demo.xml
index 719b0d5e7d9d..18b0664201fb 100644
--- a/stock_vertical_lift/demo/stock_inventory_demo.xml
+++ b/stock_vertical_lift/demo/stock_inventory_demo.xml
@@ -13,8 +13,11 @@
-
+
+
+
+
diff --git a/stock_vertical_lift/demo/stock_location_demo.xml b/stock_vertical_lift/demo/stock_location_demo.xml
index b66667e8ea38..9b352e76bc11 100644
--- a/stock_vertical_lift/demo/stock_location_demo.xml
+++ b/stock_vertical_lift/demo/stock_location_demo.xml
@@ -11,7 +11,6 @@
internal
-
diff --git a/stock_vertical_lift/models/stock_location.py b/stock_vertical_lift/models/stock_location.py
index 3b7a394be1a7..fdc9dff898e4 100644
--- a/stock_vertical_lift/models/stock_location.py
+++ b/stock_vertical_lift/models/stock_location.py
@@ -47,9 +47,8 @@ def _compute_vertical_lift_kind(self):
if location.vertical_lift_location:
location.vertical_lift_kind = "view"
continue
- kind = tree.get(location.location_id.vertical_lift_kind)
- if kind:
- location.vertical_lift_kind = kind
+ kind = tree.get(location.location_id.vertical_lift_kind, False)
+ location.vertical_lift_kind = kind
@api.depends(
"inverse_vertical_lift_shuttle_ids", "location_id.vertical_lift_shuttle_id"
@@ -66,8 +65,7 @@ def _compute_vertical_lift_shuttle_id(self):
def _hardware_vertical_lift_tray(self, cell_location=None):
payload = self._hardware_vertical_lift_tray_payload(cell_location)
- res = self.vertical_lift_shuttle_id._hardware_send_message(payload)
- return res
+ return self.vertical_lift_shuttle_id._hardware_send_message(payload)
def _hardware_vertical_lift_tray_payload(self, cell_location=None):
"""Prepare the message to be sent to the vertical lift hardware
@@ -104,6 +102,9 @@ def _hardware_vertical_lift_tray_payload(self, cell_location=None):
position of the cell in mm from the bottom-left of a tray. (distance
from left, distance from bottom). Can be used for instance for
highlighting the cell using a laser pointer.
+
+ Returns a message in bytes, that will be sent through
+ ``VerticalLiftShuttle._hardware_send_message()``.
"""
if self.vertical_lift_shuttle_id.hardware == "simulation":
message = _("Opening tray {}.").format(self.name)
@@ -112,7 +113,7 @@ def _hardware_vertical_lift_tray_payload(self, cell_location=None):
message += _("
Laser pointer on x{} y{} ({}mm, {}mm)").format(
cell_location.posx, cell_location.posy, from_left, from_bottom
)
- return message
+ return message.encode("utf-8")
else:
raise NotImplementedError()
diff --git a/stock_vertical_lift/models/stock_move.py b/stock_vertical_lift/models/stock_move.py
index fe0ca70e35f2..b176b73434d0 100644
--- a/stock_vertical_lift/models/stock_move.py
+++ b/stock_vertical_lift/models/stock_move.py
@@ -1,13 +1,12 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import api, models
+from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
- @api.multi
def write(self, vals):
result = super().write(vals)
if "state" in vals:
diff --git a/stock_vertical_lift/models/vertical_lift_command.py b/stock_vertical_lift/models/vertical_lift_command.py
index 359ea6c2222a..39883e9be5c0 100644
--- a/stock_vertical_lift/models/vertical_lift_command.py
+++ b/stock_vertical_lift/models/vertical_lift_command.py
@@ -12,17 +12,17 @@ class VerticalLiftCommand(models.Model):
_order = "shuttle_id, name desc"
_description = "commands sent to the shuttle"
- @api.model
def _default_name(self):
return self.env["ir.sequence"].next_by_code("vertical.lift.command")
- name = fields.Char("Name", default=_default_name, required=True, index=True)
+ name = fields.Char(
+ "Name", default=lambda s: s._default_name(), required=True, index=True
+ )
command = fields.Char(required=True)
answer = fields.Char()
error = fields.Char()
shuttle_id = fields.Many2one("vertical.lift.shuttle", required=True)
- @api.model
def record_answer(self, answer):
name = self._get_key(answer)
record = self.search([("name", "=", name)], limit=1)
@@ -34,11 +34,10 @@ def record_answer(self, answer):
return record
def _get_key(self, answer):
- key = answer.split("|")[1]
+ key = answer.split("|")[1:2]
return key
@api.model_create_multi
- @api.returns("self", lambda value: value.id)
def create(self, vals_list):
for values in vals_list:
if "name" not in values:
diff --git a/stock_vertical_lift/models/vertical_lift_shuttle.py b/stock_vertical_lift/models/vertical_lift_shuttle.py
index 79c70f7e63e5..1d5670acc999 100644
--- a/stock_vertical_lift/models/vertical_lift_shuttle.py
+++ b/stock_vertical_lift/models/vertical_lift_shuttle.py
@@ -4,7 +4,7 @@
import socket
import ssl
-from odoo import _, api, fields, models
+from odoo import _, fields, models
_logger = logging.getLogger(__name__)
@@ -49,7 +49,6 @@ class VerticalLiftShuttle(models.Model):
)
]
- @api.model
def _selection_hardware(self):
return [("simulation", "Simulation")]
@@ -161,7 +160,7 @@ def action_open_screen(self):
"res_id": operation.id,
"target": "fullscreen",
"flags": {
- "headless": True,
+ "withControlPanel": False,
"form_view_initial_mode": "edit",
"no_breadcrumbs": True,
},
@@ -222,7 +221,6 @@ class VerticalLiftShuttleManualBarcode(models.TransientModel):
barcode = fields.Char(string="Barcode")
- @api.multi
def button_save(self):
active_id = self.env.context.get("active_id")
model = self.env.context.get("active_model")
diff --git a/stock_vertical_lift/tests/common.py b/stock_vertical_lift/tests/common.py
index 29190936c4dd..701503ab5815 100644
--- a/stock_vertical_lift/tests/common.py
+++ b/stock_vertical_lift/tests/common.py
@@ -116,7 +116,6 @@ def _create_inventory(cls, products):
"""
values = {
"name": "Test Inventory",
- "filter": "partial",
"line_ids": [
(
0,
diff --git a/stock_vertical_lift/views/stock_move_line_views.xml b/stock_vertical_lift/views/stock_move_line_views.xml
index 39249814e392..5dab678aa9fc 100644
--- a/stock_vertical_lift/views/stock_move_line_views.xml
+++ b/stock_vertical_lift/views/stock_move_line_views.xml
@@ -2,7 +2,7 @@
- stock.move.line.operations.tree.tray.type
+ stock.move.line.operations.tree.vertical.lift
stock.move.line
diff --git a/stock_vertical_lift/views/vertical_lift_shuttle_views.xml b/stock_vertical_lift/views/vertical_lift_shuttle_views.xml
index 427196b30b44..104b61707d85 100644
--- a/stock_vertical_lift/views/vertical_lift_shuttle_views.xml
+++ b/stock_vertical_lift/views/vertical_lift_shuttle_views.xml
@@ -155,7 +155,6 @@
Vertical Lift Shuttles
ir.actions.act_window
vertical.lift.shuttle
- form
kanban,tree,form
current
[]
diff --git a/stock_vertical_lift_kardex/__manifest__.py b/stock_vertical_lift_kardex/__manifest__.py
index e973ec0b5ae2..4a1e76a8d0a2 100644
--- a/stock_vertical_lift_kardex/__manifest__.py
+++ b/stock_vertical_lift_kardex/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Vertical Lift - Kardex",
"summary": "Integrate with Kardex Remstar Vertical Lifts",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Stock",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/stock_vertical_lift_kardex/models/vertical_lift_shuttle.py b/stock_vertical_lift_kardex/models/vertical_lift_shuttle.py
index 54e046dfd997..7d0d81fd5464 100644
--- a/stock_vertical_lift_kardex/models/vertical_lift_shuttle.py
+++ b/stock_vertical_lift_kardex/models/vertical_lift_shuttle.py
@@ -1,7 +1,7 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import api, models
+from odoo import models
JMIF_STATUS = {
0: "success",
@@ -24,7 +24,6 @@
class VerticalLiftShuttle(models.Model):
_inherit = "vertical.lift.shuttle"
- @api.model
def _selection_hardware(self):
values = super()._selection_hardware()
values += [("kardex", "Kardex")]