Skip to content

Commit

Permalink
feat: change task order as in email
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément committed Jul 19, 2024
1 parent 991552b commit c5d8e33
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion muskathlon/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# pylint: disable=C8101
{
"name": "Muskathlon",
"version": "14.0.1.2.0",
"version": "14.0.1.2.01",
"category": "Reports",
"author": "Compassion CH",
"license": "AGPL-3",
Expand Down
8 changes: 4 additions & 4 deletions muskathlon/data/event_registration_task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
</record>
<record id="task_criminal" model="event.registration.task">
<field name="name">Upload Criminal Record</field>
<field name="sequence">3</field>
<field name="sequence">6</field>
<field name="stage_id" ref="stage_fill_profile" />
<field name="website_published" eval="True" />
</record>
<record id="task_flight_details" model="event.registration.task">
<field name="name">Give flight details</field>
<field name="sequence">4</field>
<field name="sequence">3</field>
<field name="stage_id" ref="stage_fill_profile" />
<field name="website_published" eval="True" />
</record>
<record id="task_medical" model="event.registration.task">
<field name="name">Fill medical survey</field>
<field name="sequence">5</field>
<field name="sequence">4</field>
<field name="stage_id" ref="stage_fill_profile" />
<field name="website_published" eval="True" />
</record>
<record id="task_sign_child_protection" model="event.registration.task">
<field name="name">Sign child protection agreement</field>
<field name="sequence">6</field>
<field name="sequence">5</field>
<field name="stage_id" ref="stage_fill_profile" />
<field name="website_published" eval="True" />
<field
Expand Down
33 changes: 33 additions & 0 deletions muskathlon/migrations/14.0.1.2.1/post-migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from openupgradelib import openupgrade
from odoo import api, SUPERUSER_ID

event_registration_task_ids = [
"task_passport",
"task_criminal",
"task_flight_details",
"task_medical",
"task_sign_child_protection",
]


def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})

openupgrade.set_xml_ids_noupdate_value(
env,
"muskathlon",
event_registration_task_ids,
False
)

env.ref('muskathlon.task_criminal').sequence = 6
env.ref('muskathlon.task_flight_details').sequence = 3
env.ref('muskathlon.task_medical').sequence = 4
env.ref('muskathlon.task_sign_child_protection').sequence = 5

openupgrade.set_xml_ids_noupdate_value(
env,
"muskathlon",
event_registration_task_ids,
True
)

0 comments on commit c5d8e33

Please sign in to comment.