From 76b72ab5953c1fc72e3c06464fd1c65e6420a4b3 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli <nim@odoo.com> Date: Wed, 27 Nov 2019 07:52:58 +0000 Subject: [PATCH] [FIX] stock: confusing error message In case of a picking type where stock move lines are not shown, clicking on 'Put in Pack' without 'Done' quantitites set shows a confusing error message. closes odoo/odoo#40920 Related: odoo/enterprise#6901 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> --- addons/stock/i18n/stock.pot | 6 ++++++ addons/stock/models/stock_picking.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index afca8e8a3592..2ce902f24d96 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -4039,6 +4039,12 @@ msgstr "" msgid "Planned Transfer" msgstr "" +#. module: stock +#: code:addons/stock/models/stock_picking.py:0 +#, python-format +msgid "Please add 'Done' qantitites to the picking to create a new pack." +msgstr "" + #. module: stock #: code:addons/stock/models/stock_picking.py:0 #, python-format diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index e63557a2dbc0..3aba18b944b8 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -1201,7 +1201,7 @@ class Picking(models.Model): res = self._put_in_pack(move_line_ids) return res else: - raise UserError(_('All the products currently reserved in the picking are already in a pack. Please add products to the picking to create a new pack.')) + raise UserError(_("Please add 'Done' qantitites to the picking to create a new pack.")) def button_scrap(self): self.ensure_one() -- GitLab