[FIX] survey: force title on duplicate only if not already specified
No need to force a new title on duplicate if something is already given. Task ID-2265556 PR odoo/odoo#52391 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -314,8 +314,8 @@ class Survey(models.Model):
|
||||
return result
|
||||
|
||||
def copy_data(self, default=None):
|
||||
title = _("%s (copy)") % (self.title)
|
||||
default = dict(default or {}, title=title)
|
||||
new_defaults = {'title': _("%s (copy)") % (self.title)}
|
||||
default = dict(new_defaults, **(default or {}))
|
||||
return super(Survey, self).copy_data(default)
|
||||
|
||||
def toggle_active(self):
|
||||
|
||||
Reference in New Issue
Block a user