generated from OCA/oca-addons-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
T1061 Migrate group_visit data into website_switzerland module
- Loading branch information
Showing
18 changed files
with
1,769 additions
and
55 deletions.
There are no files selected for viewing
Empty file.
22 changes: 22 additions & 0 deletions
22
website_event_compassion/migrations/14.0.1.1.0/pre-migrate.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
def migrate(cr, version): | ||
cr.execute( | ||
""" | ||
UPDATE ir_model_data | ||
SET module= 'website_switzerland' | ||
WHERE module = 'website_event_compassion' | ||
AND (model IN ('mail.template', 'partner.communication.config', | ||
'event.registration.task', 'event.type.mail') | ||
OR name like 'stage_group_%' | ||
OR name = 'event_type_group_visit' | ||
OR model like 'survey.%' | ||
) | ||
""" | ||
) | ||
# Force module install | ||
cr.execute( | ||
""" | ||
UPDATE ir_module_module | ||
SET state = 'to install' | ||
WHERE name = 'website_switzerland' | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
<odoo> | ||
<data noupdate="1"> | ||
<!-- Group visit e-mails --> | ||
<record | ||
id="group_visit_step1_config" | ||
model="partner.communication.config" | ||
> | ||
<field | ||
name="name" | ||
>Group visit: step1 registration confirmation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field name="email_template_id" ref="group_visit_step1_email" /> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_step2_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: step2 confirmation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field name="email_template_id" ref="group_visit_step2_email" /> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
<field | ||
name="attachments_function" | ||
>get_trip_down_payment_attachment</field> | ||
</record> | ||
<record | ||
id="group_visit_step3_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: step3 confirmation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field name="email_template_id" ref="group_visit_step3_email" /> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_medical_survey_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: medical survey invitation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_medical_survey_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_medical_discharge_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: medical discharge request</field> | ||
<field name="send_mode">digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_medical_discharge_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_travel_documents_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: travel documents request</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_travel_documents_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
<field | ||
name="attachments_function" | ||
>get_trip_payment_attachment</field> | ||
</record> | ||
<record | ||
id="group_visit_information_day_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: info day invitation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_information_day_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_after_party_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: after trip party invitation</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_after_trip_party_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_detailed_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: detailed information</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_detailed_info_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_before_sharing_config" | ||
model="partner.communication.config" | ||
> | ||
<field | ||
name="name" | ||
>Group visit: before trip sharing information</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_before_sharing_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
<record | ||
id="group_visit_after_trip_feedback_config" | ||
model="partner.communication.config" | ||
> | ||
<field name="name">Group visit: after trip feedback</field> | ||
<field name="send_mode">auto_digital</field> | ||
<field | ||
name="email_template_id" | ||
ref="group_visit_after_trip_feedback_email" | ||
/> | ||
<field | ||
name="report_id" | ||
ref="partner_communication.report_a4_communication" | ||
/> | ||
<field | ||
name="model_id" | ||
ref="website_event_compassion.model_event_registration" | ||
/> | ||
<field name="user_id" search="[('login', 'like', 'nhanggi')]" /> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<!-- Specific stages for group visit --> | ||
<record id="stage_group_unconfirmed" model="event.registration.stage"> | ||
<field name="name">Sign Agreements</field> | ||
<field name="sequence">1</field> | ||
<field name="duration">7</field> | ||
<field name="requirements"> | ||
* Sign child protection agreement | ||
* Sign travel agreement | ||
* Send a passport copy | ||
* Send certificate of criminal record | ||
</field> | ||
<field | ||
name="event_type_ids" | ||
eval="[(6, 0, [ref('event_type_group_visit'), | ||
ref('event_type_youth_trip')])]" | ||
/> | ||
</record> | ||
<record id="stage_group_pay" model="event.registration.stage"> | ||
<field name="name">Down payment</field> | ||
<field name="sequence">2</field> | ||
<field name="duration">7</field> | ||
<field name="requirements"> | ||
* Pay registration down payment fee | ||
</field> | ||
<field | ||
name="event_type_ids" | ||
eval="[(6, 0, [ref('event_type_group_visit'), | ||
ref('event_type_youth_trip')])]" | ||
/> | ||
</record> | ||
<record id="stage_group_medical" model="event.registration.stage"> | ||
<field name="name">Medical survey</field> | ||
<field name="sequence">3</field> | ||
<field name="duration">7</field> | ||
<field name="requirements"> | ||
* Fill medical survey | ||
* Sign medical discharge if needed | ||
</field> | ||
<field | ||
name="event_type_ids" | ||
eval="[(6, 0, [ref('event_type_group_visit'), | ||
ref('event_type_youth_trip')])]" | ||
/> | ||
</record> | ||
<record id="stage_group_documents" model="event.registration.stage"> | ||
<field name="name">Payment</field> | ||
<field name="sequence">4</field> | ||
<field name="duration">7</field> | ||
<field name="requirements"> | ||
* Fill urgency contact information | ||
* Pay the whole trip fees | ||
</field> | ||
<field | ||
name="event_type_ids" | ||
eval="[(6, 0, [ref('event_type_group_visit'), | ||
ref('event_type_youth_trip')])]" | ||
/> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<!-- Group visit tasks --> | ||
<record id="task_sign_child_protection" model="event.registration.task"> | ||
<field name="name">Sign child protection agreement</field> | ||
<field name="sequence">0</field> | ||
<field name="stage_id" ref="stage_group_unconfirmed" /> | ||
</record> | ||
<record id="task_sign_travel" model="event.registration.task"> | ||
<field name="name">Sign travel agreement</field> | ||
<field name="sequence">1</field> | ||
<field name="stage_id" ref="stage_group_unconfirmed" /> | ||
</record> | ||
<record id="task_passport" model="event.registration.task"> | ||
<field name="name">Send a passport copy</field> | ||
<field name="sequence">2</field> | ||
<field name="stage_id" ref="stage_group_unconfirmed" /> | ||
</record> | ||
<record id="task_criminal" model="event.registration.task"> | ||
<field name="name">Send certificate of criminal record</field> | ||
<field name="sequence">3</field> | ||
<field name="stage_id" ref="stage_group_unconfirmed" /> | ||
</record> | ||
<record id="task_urgency_contact" model="event.registration.task"> | ||
<field name="name">Fill urgency contact information</field> | ||
<field name="sequence">1</field> | ||
<field name="stage_id" ref="stage_group_unconfirmed" /> | ||
</record> | ||
<record id="task_down_payment" model="event.registration.task"> | ||
<field name="name">Pay fees</field> | ||
<field name="sequence">0</field> | ||
<field name="stage_id" ref="stage_group_pay" /> | ||
</record> | ||
<record id="task_medical_survey" model="event.registration.task"> | ||
<field name="name">Fill medical survey</field> | ||
<field name="sequence">0</field> | ||
<field name="stage_id" ref="stage_group_medical" /> | ||
</record> | ||
<record id="task_medical_discharge" model="event.registration.task"> | ||
<field name="name">Sign medical discharge</field> | ||
<field name="sequence">1</field> | ||
<field name="stage_id" ref="stage_group_medical" /> | ||
</record> | ||
<record id="task_full_payment" model="event.registration.task"> | ||
<field name="name">Pay the trip</field> | ||
<field name="sequence">2</field> | ||
<field name="stage_id" ref="stage_group_documents" /> | ||
</record> | ||
</data> | ||
</odoo> |
Oops, something went wrong.