diff --git a/tg_marketing/__manifest__.py b/tg_marketing/__manifest__.py index 3e6b470..c845941 100644 --- a/tg_marketing/__manifest__.py +++ b/tg_marketing/__manifest__.py @@ -18,6 +18,6 @@ "views/contact_views.xml", "wizard/marketing_answer_merge_views.xml", ], - "demo": [], + "demo": ["data/event_question_demo.xml"], "qweb": [], } diff --git a/tg_marketing/controllers/main.py b/tg_marketing/controllers/main.py index 6fc61b0..9185d1f 100644 --- a/tg_marketing/controllers/main.py +++ b/tg_marketing/controllers/main.py @@ -6,7 +6,8 @@ class WebsiteEventMarketing(WebsiteEventController): @route() def registration_confirm(self, event, **post): - res = super().registration_confirm(event, **post) + filtered_post = {k: v for k, v in post.items() if "marketing_answer" not in k} + res = super().registration_confirm(event, **filtered_post) MarketingAnswers = request.env["res.partner.marketing.answer"].sudo() partner_marketing_vals = {} diff --git a/tg_marketing/data/event_question_demo.xml b/tg_marketing/data/event_question_demo.xml new file mode 100644 index 0000000..c9178ef --- /dev/null +++ b/tg_marketing/data/event_question_demo.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tg_marketing/views/event_templates.xml b/tg_marketing/views/event_templates.xml index 83c155e..c7ea950 100644 --- a/tg_marketing/views/event_templates.xml +++ b/tg_marketing/views/event_templates.xml @@ -14,7 +14,7 @@