From 11de72933bc63b45e02a1523fc6a069ca2eb5a27 Mon Sep 17 00:00:00 2001 From: nguyenvietlam0640 Date: Fri, 30 Jun 2023 11:55:03 +0700 Subject: [PATCH] [MIG] hr_skills: migrate 15 to 16 --- docsource/modules150-160.rst | 2 +- .../hr_skills/16.0.1.0/post-migration.py | 6 ++ .../16.0.1.0/upgrade_analysis_work.txt | 59 +++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/hr_skills/16.0.1.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/hr_skills/16.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index e62f4691e7b8..242e4e350b12 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -194,7 +194,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | hr_recruitment_survey | Nothing to do |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| hr_skills | | | +| hr_skills | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | hr_skills_slides | Nothing to do | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/hr_skills/16.0.1.0/post-migration.py b/openupgrade_scripts/scripts/hr_skills/16.0.1.0/post-migration.py new file mode 100644 index 000000000000..d6d54b2f02b5 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_skills/16.0.1.0/post-migration.py @@ -0,0 +1,6 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "hr_skills", "16.0.1.0/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/hr_skills/16.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_skills/16.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..50e79a41af2d --- /dev/null +++ b/openupgrade_scripts/scripts/hr_skills/16.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,59 @@ +---Models in module 'hr_skills'--- +new model hr.employee.skill.log +new model hr.employee.skill.report [abstract] + +# NOTHING TO DO: new models + +---Fields in module 'hr_skills'--- +hr_skills / hr.employee / skill_ids (many2many) : NEW relation: hr.skill, isfunction: function, stored +hr_skills / hr.employee.skill / _order : _order is now 'skill_type_id, skill_level_id' ('skill_level_id') + +# NOTHING TO DO + +hr_skills / hr.employee.skill.log / date (date) : NEW hasdefault: default +hr_skills / hr.employee.skill.log / department_id (many2one) : NEW relation: hr.department +hr_skills / hr.employee.skill.log / employee_id (many2one) : NEW relation: hr.employee, required +hr_skills / hr.employee.skill.log / level_progress (integer) : NEW isrelated: related, stored +hr_skills / hr.employee.skill.log / skill_id (many2one) : NEW relation: hr.skill, required, hasdefault: compute +hr_skills / hr.employee.skill.log / skill_level_id (many2one) : NEW relation: hr.skill.level, required, hasdefault: compute +hr_skills / hr.employee.skill.log / skill_type_id (many2one) : NEW relation: hr.skill.type, required + +# NOTHING TO DO: new fields of new model hr.employee.skill.log + +hr_skills / hr.skill / _order : _order is now 'sequence, name' ('id') +hr_skills / hr.skill / sequence (integer) : NEW hasdefault: default + +# NOTHING TO DO + +hr_skills / hr.skill / skill_type_id (many2one) : now required + +# NOTHING TO DO: old field now required and no need to do anything + +hr_skills / hr.skill.level / default_level (boolean) : NEW +hr_skills / hr.skill.type / _order : _order is now 'name' ('id') + +# NOTHING TO DO + +---XML records in module 'hr_skills'--- +NEW ir.actions.act_window: hr_skills.action_hr_employee_skill_log_department +NEW ir.actions.act_window: hr_skills.action_hr_employee_skill_log_employee +NEW ir.actions.act_window: hr_skills.hr_employee_skill_report_action +NEW ir.actions.server: hr_skills.action_open_skills_log_department +NEW ir.actions.server: hr_skills.action_open_skills_log_employee +NEW ir.model.access: hr_skills.access_hr_employee_skill_log +NEW ir.model.access: hr_skills.access_hr_employee_skill_report +NEW ir.model.constraint: hr_skills.constraint_hr_employee_skill_log__unique_skill_log +NEW ir.model.constraint: hr_skills.constraint_hr_skill_level_check_level_progress +NEW ir.rule: hr_skills.hr_employee_skill_report_multicompany (noupdate) +NEW ir.ui.menu: hr_skills.hr_employee_skill_report_menu +NEW ir.ui.view: hr_skills.hr_department_view_kanban +NEW ir.ui.view: hr_skills.hr_employee_skill_log_view_graph_department +NEW ir.ui.view: hr_skills.hr_employee_skill_log_view_graph_employee +NEW ir.ui.view: hr_skills.hr_employee_skill_log_view_search +NEW ir.ui.view: hr_skills.hr_employee_skill_log_view_tree +NEW ir.ui.view: hr_skills.hr_employee_skill_report_view_list +NEW ir.ui.view: hr_skills.hr_employee_skill_report_view_pivot +NEW ir.ui.view: hr_skills.hr_employee_skill_report_view_search +NEW ir.ui.view: hr_skills.hr_skill_view_search + +# NOTHING TO DO