Skip to content

Commit

Permalink
[MIG] website_hr_recruitment: migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
tranngocson1996 committed Jan 15, 2022
1 parent 4c181fb commit 303f06c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|website_google_map | |
+--------------------------------------------+-------------------------------------------------+
|website_hr_recruitment | |
|website_hr_recruitment | Done |
+--------------------------------------------+-------------------------------------------------+
| |new| website_jitsi | |
+--------------------------------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.delete_records_safely_by_xml_id(
env,
["website_hr_recruitment.menu_jobs"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.set_xml_ids_noupdate_value(
env,
"website_hr_recruitment",
[
"hr_department_public",
"hr_job_officer",
"hr_job_portal",
"hr_job_public",
],
True,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---Models in module 'website_hr_recruitment'---
---Fields in module 'website_hr_recruitment'---
website_hr_recruitment / hr.job / seo_name (char) : NEW
# NOTHING TO DO

---XML records in module 'website_hr_recruitment'---
ir.rule: website_hr_recruitment.hr_department_public (noupdate) (noupdate switched)
ir.rule: website_hr_recruitment.hr_job_officer (noupdate) (noupdate switched)
ir.rule: website_hr_recruitment.hr_job_portal (noupdate) (noupdate switched)
ir.rule: website_hr_recruitment.hr_job_public (noupdate) (noupdate switched)
# DONE: pre-migration: noupdate changed to "1"

NEW ir.ui.view: website_hr_recruitment.assets_frontend
NEW ir.ui.view: website_hr_recruitment.job_edit_options
NEW ir.ui.view: website_hr_recruitment.job_filter_by_countries
NEW ir.ui.view: website_hr_recruitment.job_filter_by_departments
NEW ir.ui.view: website_hr_recruitment.job_filter_by_offices
NEW ir.ui.view: website_hr_recruitment.job_right_side_bar
NEW ir.ui.view: website_hr_recruitment.view_hr_job_kanban_referal_extends
DEL ir.ui.view: website_hr_recruitment.job_countries
DEL ir.ui.view: website_hr_recruitment.job_departments
DEL ir.ui.view: website_hr_recruitment.job_offices
# NOTHING TO DO

DEL website.menu: website_hr_recruitment.menu_jobs (noupdate)
# DONE: post-migration: safely deleted xmlid

0 comments on commit 303f06c

Please sign in to comment.