diff options
| author | Adrian Torres <adt@odoo.com> | 2019-07-10 14:59:37 +0200 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2019-07-17 14:13:12 +0200 |
| commit | 4b38cc6590abcb58a0ca102a06063eb3db7ac1f4 (patch) | |
| tree | cfd11739fc6b4c0cb4b23b54cc6badad4bf5c55e /addons/survey/models/survey_question.py | |
| parent | f6fdde96bddfedf8764cd8a73089e44340d476ae (diff) | |
[REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Diffstat (limited to 'addons/survey/models/survey_question.py')
| -rw-r--r-- | addons/survey/models/survey_question.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/addons/survey/models/survey_question.py b/addons/survey/models/survey_question.py index f84a5c41aba..7337b79c303 100644 --- a/addons/survey/models/survey_question.py +++ b/addons/survey/models/survey_question.py @@ -141,7 +141,6 @@ class SurveyQuestion(models.Model): # Validation methods - @api.multi def validate_question(self, post, answer_tag): """ Validate question, depending on question type and parameters """ self.ensure_one() @@ -153,7 +152,6 @@ class SurveyQuestion(models.Model): else: return checker(post, answer_tag) - @api.multi def validate_free_text(self, post, answer_tag): self.ensure_one() errors = {} @@ -163,7 +161,6 @@ class SurveyQuestion(models.Model): errors.update({answer_tag: self.constr_error_msg}) return errors - @api.multi def validate_textbox(self, post, answer_tag): self.ensure_one() errors = {} @@ -186,7 +183,6 @@ class SurveyQuestion(models.Model): errors.update({answer_tag: self.validation_error_msg}) return errors - @api.multi def validate_numerical_box(self, post, answer_tag): self.ensure_one() errors = {} @@ -253,15 +249,12 @@ class SurveyQuestion(models.Model): pass return errors - @api.multi def validate_date(self, post, answer_tag): return self.date_validation('date', post, answer_tag, self.validation_min_date, self.validation_max_date) - @api.multi def validate_datetime(self, post, answer_tag): return self.date_validation('datetime', post, answer_tag, self.validation_min_datetime, self.validation_max_datetime) - @api.multi def validate_simple_choice(self, post, answer_tag): self.ensure_one() errors = {} @@ -277,7 +270,6 @@ class SurveyQuestion(models.Model): errors.update({answer_tag: self.constr_error_msg}) return errors - @api.multi def validate_multiple_choice(self, post, answer_tag): self.ensure_one() errors = {} @@ -297,7 +289,6 @@ class SurveyQuestion(models.Model): errors.update({answer_tag: self.constr_error_msg}) return errors - @api.multi def validate_matrix(self, post, answer_tag): self.ensure_one() errors = {} @@ -317,7 +308,6 @@ class SurveyQuestion(models.Model): errors.update({answer_tag: self.constr_error_msg}) return errors - @api.multi @api.depends('survey_id.question_and_page_ids.is_page', 'survey_id.question_and_page_ids.sequence') def _compute_question_ids(self): """Will take all questions of the survey for which the index is higher than the index of this page @@ -335,7 +325,6 @@ class SurveyQuestion(models.Model): else: question.question_ids = self.env['survey.question'] - @api.multi @api.depends('survey_id.question_and_page_ids.is_page', 'survey_id.question_and_page_ids.sequence') def _compute_page_id(self): """Will find the page to which this question belongs to by looking inside the corresponding survey""" @@ -352,7 +341,6 @@ class SurveyQuestion(models.Model): None ) - @api.multi def _index(self): """We would normally just use the 'sequence' field of questions BUT, if the pages and questions are created without ever moving records around, the sequence field can be set to 0 for all the questions. |
