[FIX] survey: do not add "(copy)" everywhere
When duplicating a survey, the title of the survey gets "(copy)", but the pages and the questions should not.
This commit is contained in:
@@ -518,15 +518,6 @@ class survey_page(osv.Model):
|
||||
'sequence': 10
|
||||
}
|
||||
|
||||
# Public methods #
|
||||
|
||||
def copy_data(self, cr, uid, ids, default=None, context=None):
|
||||
current_rec = self.read(cr, uid, ids, fields=['title'], context=context)
|
||||
title = _("%s (copy)") % (current_rec.get('title'))
|
||||
default = dict(default or {}, title=title)
|
||||
return super(survey_page, self).copy_data(cr, uid, ids, default,
|
||||
context=context)
|
||||
|
||||
|
||||
class survey_question(osv.Model):
|
||||
''' Questions that will be asked in a survey.
|
||||
@@ -642,13 +633,6 @@ class survey_question(osv.Model):
|
||||
def onchange_validation_email(self, cr, uid, ids, validation_email, context=None):
|
||||
return {'value': {'validation_required': False}} if validation_email else {}
|
||||
|
||||
def copy_data(self, cr, uid, ids, default=None, context=None):
|
||||
current_rec = self.read(cr, uid, ids, context=context)
|
||||
question = _("%s (copy)") % (current_rec.get('question'))
|
||||
default = dict(default or {}, question=question)
|
||||
return super(survey_question, self).copy_data(cr, uid, ids, default,
|
||||
context=context)
|
||||
|
||||
# Validation methods
|
||||
|
||||
def validate_question(self, cr, uid, question, post, answer_tag, context=None):
|
||||
|
||||
Reference in New Issue
Block a user