[FIX] stock_vertical_lift: Error in tests

This commit is contained in:
Víctor Martínez
2020-12-22 17:12:37 +01:00
committed by Hai Lang
parent 8fb6930ed5
commit a2476efdaa
2 changed files with 6 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Vertical Lift",
"summary": "Provides the core for integration with Vertical Lifts",
"version": "13.0.1.1.0",
"version": "13.0.1.1.1",
"category": "Stock",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",

View File

@@ -145,6 +145,11 @@ class VerticalLiftShuttle(models.Model):
record = self.env[model].search([("shuttle_id", "=", self.id)])
if not record:
record = self.env[model].create({"shuttle_id": self.id})
# Since https://github.com/odoo/odoo/commit/3a6ac95
# _compute_vertical_lift_shuttle_id() don't work fine
# These change fix it temporally
if "location_id" in record:
record.location_id._compute_vertical_lift_shuttle_id()
return record
def action_open_screen(self):