[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,8 +784,9 @@ class product_template(osv.osv):
|
||||||
def copy(self, cr, uid, id, default=None, context=None):
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
if default is None:
|
if default is None:
|
||||||
default = {}
|
default = {}
|
||||||
template = self.browse(cr, uid, id, context=context)
|
if 'name' not in default:
|
||||||
default['name'] = _("%s (copy)") % (template['name'])
|
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)
|
return super(product_template, self).copy(cr, uid, id, default=default, context=context)
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
|
Loading…
Reference in New Issue