Skip to content

Commit

Permalink
[MIG] website_event_questions_by_ticket: Migration to version 17.0
Browse files Browse the repository at this point in the history
TT51549
  • Loading branch information
pilarvargas-tecnativa committed Nov 25, 2024
1 parent e906477 commit d1a7e50
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions website_event_questions_by_ticket/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
{
"name": "Conditional Events Questions",
"summary": "Events Questions conditional to the chosen ticket",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Website",
"website": "https://github.com/OCA/event",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "LGPL-3",
"installable": True,
"depends": ["website_event_sale", "website_event_questions"],
"depends": ["website_event"],
"data": ["views/event_event_views.xml", "views/event_templates.xml"],
}
1 change: 1 addition & 0 deletions website_event_questions_by_ticket/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- Pedro M. Baeza
- Stefan Ungureanu
- Carolina Fernandez
- Pilar Vargas
1 change: 0 additions & 1 deletion website_event_questions_by_ticket/tests/test_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def setUpClass(cls):
"event_type_id": cls.env.ref("event.event_type_1").id,
"website_published": True,
"description": "Test",
"auto_confirm": True,
"website_id": cls.website.id,
}
)
Expand Down
6 changes: 3 additions & 3 deletions website_event_questions_by_ticket/views/event_event_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<odoo>
<record model="ir.ui.view" id="view_event_question_form">
<field name="model">event.event</field>
<field name="inherit_id" ref="website_event_questions.event_event_view_form" />
<field name="inherit_id" ref="website_event.event_event_view_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='question_ids']/form/sheet/notebook"
position="after"
position="before"
>
<group>
<field
Expand All @@ -22,7 +22,7 @@
</record>
<record model="ir.ui.view" id="event_event_view_form">
<field name="model">event.event</field>
<field name="inherit_id" ref="website_event_questions.event_event_view_form" />
<field name="inherit_id" ref="website_event.event_event_view_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='question_ids']/tree/field[@name='answer_ids']"
Expand Down
13 changes: 8 additions & 5 deletions website_event_questions_by_ticket/views/event_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,32 @@
<odoo>
<template
id="registration_attendee_details_questions"
inherit_id="website_event_questions.registration_attendee_details_questions"
inherit_id="website_event.registration_attendee_details"
priority="99999"
>
<xpath expr="//t[@t-if='event.specific_question_ids']" position="attributes">
<xpath expr="//div[@t-if='event.specific_question_ids']" position="attributes">
<attribute
name="t-if"
>event._get_specific_questions(ticket['id'])</attribute>
</xpath>
<xpath
expr="//div[@t-foreach='event.specific_question_ids']"
expr="//t[@t-foreach='event.specific_question_ids']"
position="attributes"
>
<attribute
name="t-foreach"
>event._get_specific_questions(ticket['id'])</attribute>
</xpath>
<xpath expr="//t[@t-if='event.general_question_ids']" position="attributes">
<xpath
expr="//div[hasclass('o_wevent_registration_question_global')]"
position="attributes"
>
<attribute
name="t-if"
>event._get_general_questions([x['id'] for x in tickets])</attribute>
</xpath>
<xpath
expr="//div[@t-foreach='event.general_question_ids']"
expr="//t[@t-foreach='event.general_question_ids']"
position="attributes"
>
<attribute
Expand Down

0 comments on commit d1a7e50

Please sign in to comment.