[FIX] product: make copy friendlier to overrides
Do not force to use "<name> (copy)" when duplicating Closes #12397
This commit is contained in:
parent
baa4cc0e97
commit
606eab8ef8
|
@ -784,6 +784,7 @@ class product_template(osv.osv):
|
|||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if 'name' not in default:
|
||||
template = self.browse(cr, uid, id, context=context)
|
||||
default['name'] = _("%s (copy)") % (template['name'])
|
||||
return super(product_template, self).copy(cr, uid, id, default=default, context=context)
|
||||
|
|
Loading…
Reference in New Issue