From 084c86b3560404d9d74966f332184b59cc6316af Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 15 Oct 2019 16:50:35 +0200 Subject: [PATCH] Add button on locations to fetch the tray --- stock_vertical_lift/models/stock_location.py | 6 ++++++ stock_vertical_lift/views/stock_location_views.xml | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/stock_vertical_lift/models/stock_location.py b/stock_vertical_lift/models/stock_location.py index 93e02cf6513b..dd457322817f 100644 --- a/stock_vertical_lift/models/stock_location.py +++ b/stock_vertical_lift/models/stock_location.py @@ -154,3 +154,9 @@ def fetch_vertical_lift_tray(self, cell_location=None): % (self.name,) ) return True + + def button_fetch_vertical_lift_tray(self): + self.ensure_one() + if self.vertical_lift_kind in ("cell", "tray"): + self.fetch_vertical_lift_tray() + return True diff --git a/stock_vertical_lift/views/stock_location_views.xml b/stock_vertical_lift/views/stock_location_views.xml index 62c6e2996d0b..c884825ef3bc 100644 --- a/stock_vertical_lift/views/stock_location_views.xml +++ b/stock_vertical_lift/views/stock_location_views.xml @@ -6,6 +6,15 @@ stock.location +
+