Skip to content
Extraits de code Groupes Projets
Valider c02fcc5a rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[FIX] keep default fields from registrations

parent b72e3f65
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,9 +11,7 @@ from odoo.addons.website_event_questions.controllers.main import WebsiteEvent ...@@ -11,9 +11,7 @@ from odoo.addons.website_event_questions.controllers.main import WebsiteEvent
class WebsiteEventPartnerQuestion(WebsiteEvent): class WebsiteEventPartnerQuestion(WebsiteEvent):
def _process_attendees_form(self, event, form_details): def _process_attendees_form(self, event, form_details):
"""Process data posted from the attendee details form. """Process data posted from the attendee details form."""
Extracts question answers:
- For questions of type 'multiple_choice', extracting the suggested answer id"""
registrations = super()._process_attendees_form(event, form_details) registrations = super()._process_attendees_form(event, form_details)
fields_to_update = {} fields_to_update = {}
......
...@@ -178,22 +178,29 @@ ...@@ -178,22 +178,29 @@
priority="101" priority="101"
> >
<!-- <!--
in case question_ids are defined, user is connected and we are registering for the first ticket Phone is only displayed if user not connected or if we are not registering the
we hide the 3 default fields and replace by partner related questions first contact
--> -->
<xpath <xpath
expr="//t[@name='attendee_loop']//*[hasclass('modal-body')]/div[hasclass('row')]" expr="//t[@name='attendee_loop']//*[hasclass('modal-body')]/div[hasclass('row')]/div[input[@type='tel']]"
position="attributes" position="attributes"
> >
<attribute <attribute
name="t-if" name="t-if"
>not event.partner_question_ids or request.env.user._is_public() or counter > 1</attribute> >request.env.user._is_public() or counter > 1</attribute>
</xpath> </xpath>
<!--
in case question_ids are defined, user is connected and we are registering for
the first ticket, question_ids are displayed
-->
<xpath <xpath
expr="//t[@name='attendee_loop']//*[hasclass('modal-body')]/div[hasclass('row')]" expr="//t[@name='attendee_loop']//*[hasclass('modal-body')]/div[hasclass('row')]"
position="after" position="after"
> >
<div t-else="" class="my-4"> <t
t-if="event.partner_question_ids and not request.env.user._is_public() and counter == 1"
>
<div class="my-4">
<div <div
t-foreach="event.partner_question_ids" t-foreach="event.partner_question_ids"
t-as="question" t-as="question"
...@@ -205,6 +212,7 @@ ...@@ -205,6 +212,7 @@
/> />
</div> </div>
</div> </div>
</t>
</xpath> </xpath>
</template> </template>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter