From 8b75e738c169ce4fd2f57506a30568a9f8fbe6fc Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Thu, 28 Nov 2013 16:37:03 +0530 Subject: [PATCH] [imp] add code note for product.py and improve template demo. bzr revid: amb@tinyerp.com-20131128110703-hjpru7kjwvaqfg6p --- addons/product/product.py | 3 +++ addons/product/product_demo.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index 6f823b2cd23..405a0134ed3 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -478,6 +478,9 @@ class product_template(osv.osv): default = default.copy() default.update(name=_("%s (copy)") % (template['name'])) id = super(product_template, self).copy(cr, uid, id, default=default, context=context) + '''Note: while copy a template at that time create variants(product) + with old value. and due to inherits product_tmpl_id, It's update the + new template name. So we are update new template name with copy.''' if template['product_variant_ids']: self.write(cr, uid, id, default, context) return id diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 8b7e70e52b0..e1ae3783844 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -620,7 +620,7 @@ QWERTY keyboard - Pen Drive, SP-2 + Pen Drive 90.0