[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-2702872 (Event precompute)

Part-of: odoo/odoo#80672
This commit is contained in:
Thibault Delavallée
2021-12-08 15:36:50 +00:00
parent 2cc6ca6dd2
commit 2ac230b25b
@@ -52,7 +52,7 @@ class EventEvent(models.Model):
command = [(3, question.id) for question in questions_toremove]
else:
command = [(5, 0)]
if event.event_type_id.event_type_mail_ids:
if event.event_type_id.question_ids:
command += [
(0, 0, {
'title': question.title,