Comment 1 for bug 410164

Revision history for this message
Ferdinand (office-chricar) wrote :

=== modified file 'product/product.py'
--- product/product.py 2009-08-07 07:26:47 +0000
+++ product/product.py 2009-08-07 11:31:40 +0000
@@ -633,6 +633,11 @@
     def copy(self, cr, uid, id, default=None, context=None):
         if not context:
             context={}
+ product = self.browse(cr, uid, id, context=context)
+ if not default:
+ default = {}
+ default = default.copy()
+ default['name'] = (product['name'] or '') + ' (copy)'

         if ('variant' in context) and context['variant']:
             fields = ['product_tmpl_id', 'active', 'variants', 'default_code',