From 71a3b5b28280addb2bb6b1bcd2c40a3eb99d2372 Mon Sep 17 00:00:00 2001
From: Florent de Labarre <florent.mirieu@gmail.com>
Date: Thu, 28 Jul 2022 14:04:15 +0000
Subject: [PATCH] [FIX] stock: impossible to search correctly location

Before this PR Odoo don't pre-search on location.

closes odoo/odoo#97014

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
---
 addons/stock/views/stock_move_views.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml
index 7d37c98cc0b8..43f065d435dc 100644
--- a/addons/stock/views/stock_move_views.xml
+++ b/addons/stock/views/stock_move_views.xml
@@ -348,7 +348,8 @@
                 <search string="Stock Moves">
                     <field name="origin" filter_domain="['|', '|', ('origin', 'ilike', self), ('name', 'ilike', self), ('picking_id', 'ilike', self)]" string="Reference"/>
                     <field name="product_id"/>
-                    <field name="name" string="Location" filter_domain="['|',('location_id', 'ilike', self),('location_dest_id', 'ilike', self)]"/>
+                    <field name="location_id" string="Source Location" groups="stock.group_stock_multi_locations"/> 
+                    <field name="location_dest_id" string="Destination Location" groups="stock.group_stock_multi_locations"/> 
                     <field name="partner_id" string="Partner" filter_domain="[('picking_id.partner_id', 'child_of', self)]"/>
                     <filter string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
                     <filter string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
-- 
GitLab