From c4beae62ddddd61eb68ff64f18218fae866559d8 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 28 Oct 2020 10:03:40 +0000 Subject: [PATCH] [FIX] stock: incorrect search view - Activate stock locations - Go to Inventory > Configuration > Locations - Click on the 'Products' stat button The filters `real_stock_available` and `real_stock_negative` are not applied although they are in `search_default_`. This is due to c1f7987f493ca655390 which refactored the various search views of products. The solution is to add the `search_view_id` in the action. However: - `` doesn't support it - `` is deprecated in 14.0 Therefore, we convert the `act_window` element into a regular `record` and add the appropriate `search_view_id`. opw-2371962 closes odoo/odoo#60942 X-original-commit: 9677128c42761123e59fa8187a59864eb89f06e8 Signed-off-by: Nicolas Martinelli (nim) --- addons/stock/__manifest__.py | 2 +- addons/stock/views/stock_location_views.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/__manifest__.py b/addons/stock/__manifest__.py index a0c4a3eddaf..336e1114883 100644 --- a/addons/stock/__manifest__.py +++ b/addons/stock/__manifest__.py @@ -59,6 +59,7 @@ 'views/res_partner_views.xml', 'views/product_strategy_views.xml', + 'views/product_views.xml', 'views/stock_production_lot_views.xml', 'views/stock_picking_views.xml', 'views/stock_scrap_views.xml', @@ -69,7 +70,6 @@ 'views/stock_move_line_views.xml', 'views/stock_move_views.xml', 'views/stock_orderpoint_views.xml', - 'views/product_views.xml', 'views/res_config_settings_views.xml', 'views/report_stock_traceability.xml', 'views/stock_template.xml', diff --git a/addons/stock/views/stock_location_views.xml b/addons/stock/views/stock_location_views.xml index 0d08b6babe7..0c01cdb1c0e 100644 --- a/addons/stock/views/stock_location_views.xml +++ b/addons/stock/views/stock_location_views.xml @@ -7,6 +7,7 @@ 'search_default_virtual_stock_negative': 1, 'search_default_real_stock_negative': 1, 'create': False} form +