Skip to content

Commit

Permalink
[MIG] tg_marketing: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhatk0k3 authored and em230418 committed Oct 21, 2024
1 parent 599ef24 commit a4fa162
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tg_marketing/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"views/contact_views.xml",
"wizard/marketing_answer_merge_views.xml",
],
"demo": [],
"demo": ["data/event_question_demo.xml"],
"qweb": [],
}
3 changes: 2 additions & 1 deletion tg_marketing/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
5 changes: 5 additions & 0 deletions tg_marketing/data/event_question_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<odoo>
<record id="website_event.event_7_question_1" model="event.question">
<field name="event_id" eval="False" />
</record>
</odoo>
4 changes: 2 additions & 2 deletions tg_marketing/views/event_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<t t-if="marketing_questions">
<div
class="modal-body bg-light border-bottom o_wevent_registration_question_global"
class="modal-body bg-white border-bottom o_wevent_registration_question_global"
>
<div t-foreach="marketing_questions" t-as="question" class="row">
<div class="col-lg-6 mt-2">
Expand Down Expand Up @@ -49,7 +49,7 @@
<select
t-attf-name="marketing_answer-#{registration_index}-#{question.field_name}"
t-attf-data-name="marketing_answer-#{registration_index}-#{question.field_name}"
class="custom-select marketing-question-select"
class="form-select marketing-question-select"
required="true"
>
<t t-foreach="question.canned_answers" t-as="answer">
Expand Down

0 comments on commit a4fa162

Please sign in to comment.