[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.
This commit is contained in:
Víctor Martínez
2024-06-28 12:53:28 +02:00
parent 54f601cf75
commit 28df77df90
2 changed files with 1 additions and 1 deletions

View File

@@ -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

View File

@@ -17,6 +17,7 @@
<field name="rma_location_ids" invisible="1" />
<field name="picking_id" invisible="1" />
<field name="picking_type_code" invisible="1" />
<field name="location_id" invisible="1" />
</group>
</field>
</field>