From 4479aac52fc2f2503a07373f14f8ab3b5d683d16 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 12 Jun 2018 16:53:44 +0200 Subject: [PATCH] [FIX] product: correctly set partner_ref Oversight of previous forward-port --- addons/product/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/models/product.py b/addons/product/models/product.py index fe04d0939dc..19f0fc50890 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -231,8 +231,8 @@ class ProductProduct(models.Model): for supplier_info in self.seller_ids: if supplier_info.name.id == self._context.get('partner_id'): product_name = supplier_info.product_name or self.default_code - break self.partner_ref = '%s%s' % (self.code and '[%s] ' % self.code or '', product_name) + break else: self.partner_ref = self.name_get()[0][1]