From e193df7def6ea5ccb6d8395539cc8edc6a8673e9 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 12 Aug 2019 01:16:20 +0200 Subject: [PATCH] Simplify usability code for stock.quantity.history --- stock_usability/stock_view.xml | 40 ------------------- .../wizard/stock_quantity_history.py | 6 +-- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/stock_usability/stock_view.xml b/stock_usability/stock_view.xml index c0f4287..7c3f587 100644 --- a/stock_usability/stock_view.xml +++ b/stock_usability/stock_view.xml @@ -393,37 +393,6 @@ should be able to access it. So I add a menu entry under Inventory Control. --> - - - stock.quant.search with child_of for locations - stock.quant - - - - - - - - - - - - - - - - - - - - - - - - - - - {'search_default_internal_loc': 1} - - - Quants - stock.quant - tree,form,pivot - - - - diff --git a/stock_usability/wizard/stock_quantity_history.py b/stock_usability/wizard/stock_quantity_history.py index 9626c40..9c46788 100644 --- a/stock_usability/wizard/stock_quantity_history.py +++ b/stock_usability/wizard/stock_quantity_history.py @@ -25,8 +25,6 @@ class StockQuantityHistory(models.TransientModel): # insert "location" in context for qty computation action['context']['location'] = self.location_id.id else: - # force search view with child_of for location_id - action = self.env.ref( - 'stock_usability.stock_quantity_history_quant_action').read()[0] - action['context'] = {'search_default_location_id': self.location_id.id} + action['domain'] = [('location_id', 'child_of', self.location_id.id)] + action['context'] = {} return action