From 99d287e43f496894c41002f3540ed2b3de096357 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Fri, 23 Mar 2018 21:40:12 +0000 Subject: [PATCH] [FIX] sale_stock: show complete name of product In case of changing the quantity on hand of two variants of the same product, the two message created will have the same name (the name of the product.template). Show the name of variant instead. --- addons/sale_stock/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index ccdeb94be37..432a4e57a7c 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -346,5 +346,5 @@ class SaleOrderLine(models.Model): pickings = line.order_id.picking_ids.filtered(lambda p: p.state not in ('done', 'cancel')) for picking in pickings: picking.message_post("The quantity of %s has been updated from %d to %d in %s" % - (line.product_id.name, line.product_uom_qty, values['product_uom_qty'], line.order_id.name)) + (line.product_id.display_name, line.product_uom_qty, values['product_uom_qty'], line.order_id.name)) super(SaleOrderLine, self)._update_line_quantity(values)