diff options
| author | Jinal Patel <jip@odoo.com> | 2019-05-09 06:56:04 +0000 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2019-05-22 12:48:11 +0000 |
| commit | 84e2c85b93a7e697d560d8bd665a7a09e263ab9c (patch) | |
| tree | 1d84040a5307ad354133766f4bcb6ae415013664 /addons | |
| parent | 3418f8c4c47fea91eb5280a67f3c9f0f96f58753 (diff) | |
[FIX] stock: return wizard in multi location
In `_create_returns`, the code creates a picking using
`self.location_id` as destination location.
When the multi location group is not active, the user has no possibility
to change this field and it is correctly initialized. When the multi
location groups is active, the user has this possibility.
If the user empties out this field and tries to validate the return,
he's faced with an error. We make this field required in the view to
prevent any issues.
Task-1986294
Fixes 24207
closes odoo/odoo#33463
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/wizard/stock_picking_return_views.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/wizard/stock_picking_return_views.xml b/addons/stock/wizard/stock_picking_return_views.xml index 797eab283c3..a4088dd2469 100644 --- a/addons/stock/wizard/stock_picking_return_views.xml +++ b/addons/stock/wizard/stock_picking_return_views.xml @@ -27,7 +27,7 @@ <group> <field name="parent_location_id" invisible="1"/> <field name="original_location_id" invisible="1"/> - <field name="location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_stock_multi_locations"/> + <field name="location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_stock_multi_locations" required="1"/> </group> <footer> <button name="create_returns" string="Return" type="object" class="btn-primary"/> |
