From a8ec7ddcb073ab296243f16140052df9fe417c3c Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Thu, 28 Oct 2021 13:15:52 +0000 Subject: [PATCH] [FIX] mrp_subcontracting: clarify which product to specify SN In case you use products with variants or internal references, display_name is more specific than name. closes odoo/odoo#79191 X-original-commit: c46328315a8db2f579329a8a44c23fd4769e7d44 Signed-off-by: Tiffany Chang --- addons/mrp_subcontracting/models/mrp_production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_subcontracting/models/mrp_production.py b/addons/mrp_subcontracting/models/mrp_production.py index b5bef8c1366..39c7e38829c 100644 --- a/addons/mrp_subcontracting/models/mrp_production.py +++ b/addons/mrp_subcontracting/models/mrp_production.py @@ -45,7 +45,7 @@ class MrpProduction(models.Model): raise UserError(_('You must enter a serial number for %s') % self.product_id.name) for sml in self.move_raw_ids.move_line_ids: if sml.tracking != 'none' and not sml.lot_id: - raise UserError(_('You must enter a serial number for each line of %s') % sml.product_id.name) + raise UserError(_('You must enter a serial number for each line of %s') % sml.product_id.display_name) consumption_issues = self._get_consumption_issues() if consumption_issues: return self._action_generate_consumption_wizard(consumption_issues)