From 24856621b144c5bf8e0b1ff5d4eec20d035b5849 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 5 Jun 2023 13:55:19 +0200 Subject: [PATCH 1/2] [IMP] stock_location_orderpoint: Add an index on stock move level If the database contains billion of stock moves, deletion of an orderpoint can take a great amount of time. Add an index to avoid that. --- stock_location_orderpoint/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_location_orderpoint/models/stock_move.py b/stock_location_orderpoint/models/stock_move.py index 8458daab4..2c99ce58f 100644 --- a/stock_location_orderpoint/models/stock_move.py +++ b/stock_location_orderpoint/models/stock_move.py @@ -12,7 +12,7 @@ class StockMove(models.Model): _inherit = "stock.move" location_orderpoint_id = fields.Many2one( - "stock.location.orderpoint", "Stock location orderpoint" + "stock.location.orderpoint", "Stock location orderpoint", index=True ) @ormcache("self", "product") From a6fc10924ef9a02cc6dd04da304faae35e6ba91c Mon Sep 17 00:00:00 2001 From: Michael Tietz Date: Fri, 23 Jun 2023 12:43:06 +0200 Subject: [PATCH 2/2] [FIX] stock_location_orderpoint: Fix menu location and views --- stock_location_orderpoint/readme/CONFIGURE.rst | 2 +- stock_location_orderpoint/views/menu.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_location_orderpoint/readme/CONFIGURE.rst b/stock_location_orderpoint/readme/CONFIGURE.rst index 8fcae8d7d..e49d8f43f 100644 --- a/stock_location_orderpoint/readme/CONFIGURE.rst +++ b/stock_location_orderpoint/readme/CONFIGURE.rst @@ -28,7 +28,7 @@ Location Orderpoint configuration ================================= #. Go either by the stock location you want to replenish and click on 'Orderpoints' - or go to Inventory > Configuration > Settings > Warehouse > Stock Location Orderpoint + or go to Inventory > Configuration > Warehouse > Stock Location Orderpoint #. Click on 'Create' #. Set a sequence #. Choose if the rule will be applied: diff --git a/stock_location_orderpoint/views/menu.xml b/stock_location_orderpoint/views/menu.xml index e136d69ac..627266a15 100644 --- a/stock_location_orderpoint/views/menu.xml +++ b/stock_location_orderpoint/views/menu.xml @@ -9,7 +9,7 @@ id="menu_stock_location_orderpoint" action="action_stock_location_orderpoint" name="Stock Location Orderpoint" - parent="stock.menu_product_in_config_stock" + parent="stock.menu_warehouse_config" sequence="50" />