[FIX] website_event_questions: fix propagation from template

A wrong field is used to control propagation of questions from event template
to child events. Currently an event template must use automated emails to
propagate its questions, instead of correctly checking the question enabled
field ``use_questions``.

As most templates use automated email this was not seen before.

Task-2703285 (event performance)
Task-2703289 (event testing)

closes odoo/odoo#81098

X-original-commit: 10732e077d4bfc296ca59a9c3df613b9fd1cb275
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Thibault Delavallée
2021-12-09 07:23:20 +00:00
parent b157c99d4a
commit 48e92ac956
@@ -36,7 +36,7 @@ class EventEvent(models.Model):
* type lines are added;
"""
if self._origin.question_ids:
# lines to keep: those with already sent emails or registrations
# lines to keep: those with already given answers
questions_tokeep_ids = self.env['event.registration.answer'].search(
[('question_id', 'in', self._origin.question_ids.ids)]
).question_id.ids