From 49364fced4316a7170bc2390bf07b45f7bee8413 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 29 Mar 2018 12:01:26 +0200 Subject: [PATCH] [FIX] stock: rephrase the error message Was done with a translation in stable at 106d9a98bf opw-1827181 --- addons/stock/i18n/stock.pot | 2 +- addons/stock/models/stock_picking.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 4332a3d1d9d..2927643de0e 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -5980,7 +5980,7 @@ msgstr "" #. module: stock #: code:addons/stock/models/stock_picking.py:700 #, python-format -msgid "You cannot validate a transfer if you have not processed any quantity. You should rather cancel the transfer." +msgid "You cannot validate a transfer if no quantites are reserved nor done. To force the transfer, switch in edit more and encode the done quantities." msgstr "" #. module: stock diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index e4bab6ddbe1..d9a3f33a044 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -702,7 +702,7 @@ class Picking(models.Model): no_quantities_done = all(float_is_zero(move_line.qty_done, precision_rounding=move_line.product_uom_id.rounding) for move_line in self.move_line_ids) no_reserved_quantities = all(float_is_zero(move_line.product_qty, precision_rounding=move_line.product_uom_id.rounding) for move_line in self.move_line_ids) if no_reserved_quantities and no_quantities_done: - raise UserError(_('You cannot validate a transfer if you have not processed any quantity. You should rather cancel the transfer.')) + raise UserError(_('You cannot validate a transfer if no quantites are reserved nor done. To force the transfer, switch in edit more and encode the done quantities.')) if picking_type.use_create_lots or picking_type.use_existing_lots: lines_to_check = self.move_line_ids