[FIX] survey: Nasty brackets...
authorRichard Mathot <rim@openerp.com>
Tue, 1 Jul 2014 12:51:00 +0000 (14:51 +0200)
committerRichard Mathot <rim@openerp.com>
Tue, 1 Jul 2014 12:51:00 +0000 (14:51 +0200)
addons/survey/survey.py

index 590d7ae..9ccba44 100644 (file)
@@ -360,7 +360,7 @@ class survey_survey(osv.Model):
             for cell in product(rows.keys(), answers.keys()):
                 res[cell] = 0
             for input_line in question.user_input_line_ids:
-                if input_line.answer_type == 'suggestion' and not(current_filters) or input_line.user_input_id.id in current_filters:
+                if input_line.answer_type == 'suggestion' and (not(current_filters) or input_line.user_input_id.id in current_filters):
                     res[(input_line.value_suggested_row.id, input_line.value_suggested.id)] += 1
             result_summary = {'answers': answers, 'rows': rows, 'result': res}