diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-05-25 07:04:52 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-08-17 09:09:02 +0000 |
| commit | 6156f98288b16f6c84d36bacf16d5a66a661abb3 (patch) | |
| tree | 7a760d990d660640fed108a5d1fb5c8ce62a52e5 /addons/website_event_questions | |
| parent | d5c16492397047ceb97a0879aa61f068a0eeeca8 (diff) | |
[FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
Diffstat (limited to 'addons/website_event_questions')
| -rw-r--r-- | addons/website_event_questions/models/event_question.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_event_questions/models/event_question.py b/addons/website_event_questions/models/event_question.py index 0eee8eef37b..4d058569d4c 100644 --- a/addons/website_event_questions/models/event_question.py +++ b/addons/website_event_questions/models/event_question.py @@ -46,7 +46,7 @@ class EventQuestion(models.Model): (Along with secondary pivot and tree views) - A tree view showing textual answers values for text_box questions. """ self.ensure_one() - action = self.env.ref('website_event_questions.action_event_registration_report').read()[0] + action = self.env["ir.actions.actions"]._for_xml_id("website_event_questions.action_event_registration_report") action['domain'] = [('question_id', '=', self.id)] if self.question_type == 'simple_choice': action['views'] = [(False, 'graph'), (False, 'pivot'), (False, 'tree')] |
