From 28df77df90ff10115f1d1d31064941d780cea14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Fri, 28 Jun 2024 12:53:28 +0200 Subject: [PATCH] [FIX] rma: Add location_id field for the expected behavior The location_id field is important and its value is required, we need to add it to the wizard (even if it is hidden) so that it is saved and the picking is created correctly. Before, the location_id value was only saved (although the field was not in the wizard) if the user had the "Technical / Manage Multiple Stock Locations" permission. --- rma/tests/test_rma.py | 1 - rma/wizard/stock_picking_return_views.xml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/rma/tests/test_rma.py b/rma/tests/test_rma.py index 8787b177..882e9a37 100644 --- a/rma/tests/test_rma.py +++ b/rma/tests/test_rma.py @@ -76,7 +76,6 @@ class TestRma(TransactionCase): {"name": "[Test] It's out of warranty. To be scrapped"} ) cls.env.ref("rma.group_rma_manual_finalization").users |= cls.env.user - cls.env.ref("stock.group_stock_multi_locations").users |= cls.env.user cls.warehouse = cls.env.ref("stock.warehouse0") # Ensure grouping cls.env.company.rma_return_grouping = True diff --git a/rma/wizard/stock_picking_return_views.xml b/rma/wizard/stock_picking_return_views.xml index fbd46722..9a3a10b0 100644 --- a/rma/wizard/stock_picking_return_views.xml +++ b/rma/wizard/stock_picking_return_views.xml @@ -17,6 +17,7 @@ +