From 3c4bb080c3ab71b63cf90a6b49ffebb3ea1e5545 Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Fri, 26 Jul 2019 13:20:14 +0000 Subject: [PATCH] [FIX] stock: reserve on transit location Usecase to reproduce - Create company A and company B with one warehouse each - Warehouse from A resupply warehouse in company B - Create a product and check the route MTO and resupply from warehouse A - Connect as Demo User that only have access to company B - Do a delivery order in company B for this product -> it creates a receipt from warehouse A - Deliver in warehouse A to company transit - Try to reserve the receipt in company B -> It does nothing. It happens because the receipt move is in company A and the delivery order is in company B. The move is tagged as make_to_order so the reservation is based on move_orig_ids. However the move_orig_ids is empty due to record rule that hide since it's in the other company. In order to fix it, allow to see move from other companies that goes to transit location. opw-2033066 closes odoo/odoo#35223 Signed-off-by: Nans Lefebvre (len) --- addons/stock/security/stock_security.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml index 5a61d942114..17cabddd7eb 100644 --- a/addons/stock/security/stock_security.xml +++ b/addons/stock/security/stock_security.xml @@ -89,7 +89,7 @@ stock_move multi-company - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + ['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('location_dest_id.company_id', '=', False)]