diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index fdb4d83bf8c..eba81dd2ad1 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -9318,6 +9318,13 @@ msgstr "" msgid "You may only return one picking at a time." msgstr "" +#. module: stock +#. odoo-python +#: code:addons/stock/model/stock_picking.py:0 +#, python-format +msgid " You might want to update the locations of this transfer's operations " +msgstr "" + #. module: stock #. odoo-python #: code:addons/stock/models/stock_picking.py:0 diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 1911560aa6a..45a1e2562e4 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -757,6 +757,12 @@ class Picking(models.Model): "location_id": self.location_id, "location_dest_id": self.location_dest_id }) + if any(line.reserved_qty or line.qty_done for line in self.move_ids.move_line_ids): + return {'warning': { + 'title': 'Locations to update', + 'message': _("You might want to update the locations of this transfer's operations") + } + } @api.model_create_multi def create(self, vals_list):