From e9927775289186a3176b166fd609e03f851b431a Mon Sep 17 00:00:00 2001 From: Murtaza Mithaiwala Date: Mon, 2 Aug 2021 13:02:06 +0530 Subject: [PATCH 1/2] [14.0][MIG] hr_contract --- docsource/modules130-140.rst | 2 +- .../hr_contract/14.0.1.0/noupdate_changes.xml | 2 +- .../hr_contract/14.0.1.0/post-migration.py | 9 +++++++ .../14.0.1.0/upgrade_analysis_work.txt | 24 +++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 openupgrade_scripts/scripts/hr_contract/14.0.1.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index fcbf06a105e5..6ecf06eeb17d 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -154,7 +154,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |hr_attendance | | +--------------------------------------------+-------------------------------------------------+ -|hr_contract | | +|hr_contract | Done | +--------------------------------------------+-------------------------------------------------+ |hr_expense | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml index 1d53390edc1e..99e6b705e82c 100644 --- a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml @@ -1,7 +1,7 @@ - + diff --git a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/post-migration.py b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/post-migration.py new file mode 100644 index 000000000000..eace842ae967 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/post-migration.py @@ -0,0 +1,9 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + # Load noupdate changes + openupgrade.load_data(env.cr, "hr_contract", "14.0.1.0/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..f6e79c86f103 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,24 @@ +---Models in module 'hr_contract'--- +new model hr.payroll.structure.type +---Fields in module 'hr_contract'--- +hr_contract / hr.contract / advantages (text) : DEL +hr_contract / hr.contract / company_id (many2one) : now a function +hr_contract / hr.contract / department_id (many2one) : now a function +hr_contract / hr.contract / job_id (many2one) : now a function +hr_contract / hr.contract / message_has_sms_error (boolean): module is now 'sms' ('hr_contract') +hr_contract / hr.contract / resource_calendar_id (many2one): now a function +hr_contract / hr.contract / structure_type_id (many2one) : NEW relation: hr.payroll.structure.type +hr_contract / hr.contract / website_message_ids (one2many): module is now 'portal' ('hr_contract') +hr_contract / hr.employee / medic_exam (date) : DEL +hr_contract / hr.payroll.structure.type / country_id (many2one) : NEW relation: res.country, hasdefault +hr_contract / hr.payroll.structure.type / default_resource_calendar_id (many2one): NEW relation: resource.calendar, hasdefault +hr_contract / hr.payroll.structure.type / name (char) : NEW +---XML records in module 'hr_contract'--- +NEW hr.payroll.structure.type: hr_contract.structure_type_employee (noupdate) +NEW hr.payroll.structure.type: hr_contract.structure_type_employee_cp200 (noupdate) +NEW hr.payroll.structure.type: hr_contract.structure_type_employee_cp200_pfi (noupdate) +NEW hr.payroll.structure.type: hr_contract.structure_type_worker (noupdate) +NEW ir.model.access: hr_contract.access_hr_payroll_structure_type_hr_contract_manager +NEW ir.rule: hr_contract.ir_rule_hr_payroll_structure_type_multi_company (noupdate) +NEW ir.ui.view: hr_contract.hr_departure_wizard_view_form +DEL ir.ui.view: hr_contract.hr_employee_view_kanban From 1920f3d846fa2b086ebab6dc7c83588a1023c85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Fri, 3 Dec 2021 10:04:53 +0100 Subject: [PATCH 2/2] [IMP] hr_contract: fill analysis_work.txt Co-Authored-By: Pedro M. Baeza --- .../hr_contract/14.0.1.0/noupdate_changes.xml | 6 +++--- .../14.0.1.0/upgrade_analysis_work.txt | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml index 99e6b705e82c..7b7aa0a0002f 100644 --- a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/noupdate_changes.xml @@ -1,8 +1,8 @@ - - - + diff --git a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt index f6e79c86f103..c66f9b22eb5e 100644 --- a/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt +++ b/openupgrade_scripts/scripts/hr_contract/14.0.1.0/upgrade_analysis_work.txt @@ -1,18 +1,30 @@ ---Models in module 'hr_contract'--- new model hr.payroll.structure.type +# NOTHING TO DO + ---Fields in module 'hr_contract'--- hr_contract / hr.contract / advantages (text) : DEL +# NOTHING TO DO: unused field + hr_contract / hr.contract / company_id (many2one) : now a function hr_contract / hr.contract / department_id (many2one) : now a function hr_contract / hr.contract / job_id (many2one) : now a function -hr_contract / hr.contract / message_has_sms_error (boolean): module is now 'sms' ('hr_contract') hr_contract / hr.contract / resource_calendar_id (many2one): now a function -hr_contract / hr.contract / structure_type_id (many2one) : NEW relation: hr.payroll.structure.type +# NOTHING TO DO: Computed writable fields whose dependencies are not changed + +hr_contract / hr.contract / message_has_sms_error (boolean): module is now 'sms' ('hr_contract') hr_contract / hr.contract / website_message_ids (one2many): module is now 'portal' ('hr_contract') +# NOTHING TO DO + hr_contract / hr.employee / medic_exam (date) : DEL +# NOTHING TO DO: unused field + +hr_contract / hr.contract / structure_type_id (many2one) : NEW relation: hr.payroll.structure.type hr_contract / hr.payroll.structure.type / country_id (many2one) : NEW relation: res.country, hasdefault hr_contract / hr.payroll.structure.type / default_resource_calendar_id (many2one): NEW relation: resource.calendar, hasdefault hr_contract / hr.payroll.structure.type / name (char) : NEW +# NOTHING TO DO: new feature for categorizing contracts + ---XML records in module 'hr_contract'--- NEW hr.payroll.structure.type: hr_contract.structure_type_employee (noupdate) NEW hr.payroll.structure.type: hr_contract.structure_type_employee_cp200 (noupdate) @@ -22,3 +34,4 @@ NEW ir.model.access: hr_contract.access_hr_payroll_structure_type_hr_contract_ma NEW ir.rule: hr_contract.ir_rule_hr_payroll_structure_type_multi_company (noupdate) NEW ir.ui.view: hr_contract.hr_departure_wizard_view_form DEL ir.ui.view: hr_contract.hr_employee_view_kanban +# NOTHING TO DO