diff --git a/addons/hr_timesheet/migrations/13.0.1.0/openupgrade_analysis_work.txt b/addons/hr_timesheet/migrations/13.0.1.0/openupgrade_analysis_work.txt new file mode 100644 index 000000000000..f21de5a23f66 --- /dev/null +++ b/addons/hr_timesheet/migrations/13.0.1.0/openupgrade_analysis_work.txt @@ -0,0 +1,36 @@ +---Models in module 'hr_timesheet'--- +---Fields in module 'hr_timesheet'--- +hr_timesheet / account.analytic.account / project_count (integer) : module is now 'project' ('hr_timesheet') +hr_timesheet / account.analytic.account / project_ids (one2many) : module is now 'project' ('hr_timesheet') +hr_timesheet / project.project / analytic_account_id (many2one): module is now 'project' ('hr_timesheet') +# NOTHING TO DO: Done on `project` module + +---XML records in module 'hr_timesheet'--- +DEL ir.actions.act_window: hr_timesheet.project_task_action_view_timesheet +NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_employee_graph +NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_project_graph +NEW ir.actions.act_window.view: hr_timesheet.timesheet_action_view_report_by_task_graph +DEL ir.model.access: hr_timesheet.access_account_analytic_account_portal +DEL ir.model.access: hr_timesheet.access_account_analytic_line_portal +NEW ir.ui.view: hr_timesheet.portal_layout +NEW ir.ui.view: hr_timesheet.portal_my_home_timesheet +NEW ir.ui.view: hr_timesheet.portal_my_timesheets +NEW ir.ui.view: hr_timesheet.portal_timesheet_table +NEW ir.ui.view: hr_timesheet.view_hr_timesheet_line_graph +DEL ir.ui.view: hr_timesheet.account_analytic_account_view_form_inherit +NEW res.groups: hr_timesheet.group_hr_timesheet_approver +# NOTHING TO DO: noupdate=0 + +NEW ir.module.category: base.module_category_operations_timesheets (noupdate) +# NOTHING TO DO: New record + +DEL ir.model.access: hr_timesheet.access_account_analytic_account_manager [renamed to project module] +DEL ir.model.access: hr_timesheet.access_account_analytic_account_user [renamed to project module] +DEL ir.model.access: hr_timesheet.access_account_analytic_line_project [renamed to project module] +# NOTHING TO DO: Done in `project` module + +DEL ir.rule: hr_timesheet.timesheet_rule_portal (noupdate) +# DONE: post-migration removed + +res.groups: hr_timesheet.group_timesheet_manager (noupdate switched) +# DONE: pre-migration noupdate disabled diff --git a/addons/hr_timesheet/migrations/13.0.1.0/post-migration.py b/addons/hr_timesheet/migrations/13.0.1.0/post-migration.py new file mode 100644 index 000000000000..02e0977ed532 --- /dev/null +++ b/addons/hr_timesheet/migrations/13.0.1.0/post-migration.py @@ -0,0 +1,13 @@ +# Copyright 2020 Payam Yasaie +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + +_unlink_by_xmlid = [ + 'hr_timesheet.timesheet_rule_portal', +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.delete_records_safely_by_xml_id(env, _unlink_by_xmlid) + openupgrade.load_data(env.cr, 'hr_timesheet', 'migrations/13.0.1.0/noupdate_changes.xml') diff --git a/addons/hr_timesheet/migrations/13.0.1.0/pre-migration.py b/addons/hr_timesheet/migrations/13.0.1.0/pre-migration.py new file mode 100644 index 000000000000..c38d07c9e784 --- /dev/null +++ b/addons/hr_timesheet/migrations/13.0.1.0/pre-migration.py @@ -0,0 +1,15 @@ +# Copyright 2020 Payam Yasaie +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.set_xml_ids_noupdate_value( + env, + "hr_timesheet", + [ + "group_timesheet_manager", + ], + False, + ) diff --git a/odoo/openupgrade/doc/source/modules120-130.rst b/odoo/openupgrade/doc/source/modules120-130.rst index 781a7e18d850..feb28a64c6c8 100644 --- a/odoo/openupgrade/doc/source/modules120-130.rst +++ b/odoo/openupgrade/doc/source/modules120-130.rst @@ -191,7 +191,7 @@ missing in the new release are marked with |del|. +----------------------------------------------+-------------------------------------------------+ | |new| hr_skills_survey | | +----------------------------------------------+-------------------------------------------------+ -|hr_timesheet | | +|hr_timesheet | Done | +----------------------------------------------+-------------------------------------------------+ |hr_timesheet_attendance | | +----------------------------------------------+-------------------------------------------------+