From f40da6b8ecd26d16f4464216ebbdde399171d010 Mon Sep 17 00:00:00 2001 From: Giang Pham Date: Mon, 8 Dec 2025 14:58:51 +0700 Subject: [PATCH 1/3] [FIX] account: Column types mismatch --- openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py b/openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py index 8b5723d28ba..61fe358e63e 100644 --- a/openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py +++ b/openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py @@ -73,13 +73,14 @@ def _convert_account_tax_description(env): openupgrade.add_columns( env, [(False, "invoice_label", "char", None, "account_tax")] ) - convert_column_translatable(env.cr, "account_tax", "invoice_label", "jsonb") openupgrade.logged_query( env.cr, """UPDATE account_tax SET invoice_label = description WHERE description IS NOT NULL;""", ) + convert_column_translatable(env.cr, "account_tax", "description", "jsonb") + convert_column_translatable(env.cr, "account_tax", "invoice_label", "jsonb") def _am_create_delivery_date_column(env): From c011a1b7f8835e81a4fa53f82c41003946d5c7d8 Mon Sep 17 00:00:00 2001 From: Giang Pham Date: Mon, 8 Dec 2025 15:06:53 +0700 Subject: [PATCH 2/3] [IMP] *: Update noupdate_changes for many modules --- .../auth_signup/17.0.1.0/noupdate_changes.xml | 4 +-- .../event/17.0.1.8/noupdate_changes.xml | 4 +-- .../scripts/hr/17.0.1.1/noupdate_changes.xml | 4 +-- .../17.0.1.1/noupdate_changes.xml | 20 +++++++++++++ .../hr_timesheet/17.0.1.1/post-migration.py | 6 ++++ .../17.0.1.1/upgrade_analysis.txt | 29 ++++++++++++++++++ .../17.0.1.1/upgrade_analysis_work.txt | 30 +++++++++++++++++++ .../project_sms/17.0.1.1/noupdate_changes.xml | 6 ++++ .../project_sms/17.0.1.1/post-migration.py | 6 ++++ .../project_sms/17.0.1.1/upgrade_analysis.txt | 4 +++ .../17.0.1.1/upgrade_analysis_work.txt | 5 ++++ 11 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/noupdate_changes.xml create mode 100644 openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/post-migration.py create mode 100644 openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis.txt create mode 100644 openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis_work.txt create mode 100644 openupgrade_scripts/scripts/project_sms/17.0.1.1/noupdate_changes.xml create mode 100644 openupgrade_scripts/scripts/project_sms/17.0.1.1/post-migration.py create mode 100644 openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis.txt create mode 100644 openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis_work.txt diff --git a/openupgrade_scripts/scripts/auth_signup/17.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/auth_signup/17.0.1.0/noupdate_changes.xml index 29034133720..6a158255044 100644 --- a/openupgrade_scripts/scripts/auth_signup/17.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/auth_signup/17.0.1.0/noupdate_changes.xml @@ -71,10 +71,10 @@ +1 650-123-4567 - | info@yourcompany.com + | info@yourcompany.com - | http://www.example.com + | http://www.example.com diff --git a/openupgrade_scripts/scripts/event/17.0.1.8/noupdate_changes.xml b/openupgrade_scripts/scripts/event/17.0.1.8/noupdate_changes.xml index fecddc969d3..8cef81392ea 100644 --- a/openupgrade_scripts/scripts/event/17.0.1.8/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/event/17.0.1.8/noupdate_changes.xml @@ -566,8 +566,8 @@

The order for this ticket has reference and was placed on - for an amount of - + for an amount of + .
diff --git a/openupgrade_scripts/scripts/hr/17.0.1.1/noupdate_changes.xml b/openupgrade_scripts/scripts/hr/17.0.1.1/noupdate_changes.xml index 63c00d7cd9a..2428f344523 100644 --- a/openupgrade_scripts/scripts/hr/17.0.1.1/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/hr/17.0.1.1/noupdate_changes.xml @@ -9,9 +9,9 @@ 340 - + diff --git a/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/noupdate_changes.xml b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/noupdate_changes.xml new file mode 100644 index 00000000000..c9b06fa7379 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/noupdate_changes.xml @@ -0,0 +1,20 @@ + + + + [ + '|', '|', + ('project_id.privacy_visibility', '!=', 'followers'), + ('project_id.message_partner_ids', 'in', [user.partner_id.id]), + ('task_id.message_partner_ids', 'in', [user.partner_id.id]) + ] + + + [ + ('project_id', '!=', False), + '|', '|', + ('project_id.privacy_visibility', '!=', 'followers'), + ('project_id.message_partner_ids', 'in', [user.partner_id.id]), + ('task_id.message_partner_ids', 'in', [user.partner_id.id]) + ] + + diff --git a/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/post-migration.py b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/post-migration.py new file mode 100644 index 00000000000..8a1590d1157 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/post-migration.py @@ -0,0 +1,6 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env, "hr_timesheet", "17.0.1.1/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis.txt b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis.txt new file mode 100644 index 00000000000..14e281626ca --- /dev/null +++ b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis.txt @@ -0,0 +1,29 @@ +---Models in module 'hr_timesheet'--- +new model hr.employee.delete.wizard [transient] +---Fields in module 'hr_timesheet'--- +hr_timesheet / account.analytic.line / ancestor_task_id (many2one) : DEL relation: project.task +hr_timesheet / account.analytic.line / parent_task_id (many2one) : NEW relation: project.task, isrelated: related, stored +hr_timesheet / project.project / timesheet_encode_uom_id (many2one): not related anymore +hr_timesheet / project.project / timesheet_encode_uom_id (many2one): now a function +hr_timesheet / project.update / allocated_time (integer) : NEW +hr_timesheet / project.update / timesheet_time (integer) : NEW +hr_timesheet / project.update / uom_id (many2one) : NEW relation: uom.uom +---XML records in module 'hr_timesheet'--- +DEL ir.actions.act_window.view: hr_timesheet.timesheet_action_view_from_employee_list +NEW ir.actions.server: hr_timesheet.unlink_employee_action +NEW ir.model.access: hr_timesheet.access_hr_employee_delete_wizard +DEL ir.model.access: hr_timesheet.access_project_task +NEW ir.ui.view: hr_timesheet.hr_employee_delete_wizard_form +NEW ir.ui.view: hr_timesheet.hr_timesheet_line_portal_tree +NEW ir.ui.view: hr_timesheet.portal_my_task_allocated_hours_template +NEW ir.ui.view: hr_timesheet.project_update_view_kanban_inherit +NEW ir.ui.view: hr_timesheet.timesheet_view_form_portal_user +NEW ir.ui.view: hr_timesheet.view_employee_tree_inherit_timesheet +NEW ir.ui.view: hr_timesheet.view_kanban_account_analytic_line_portal_user +DEL ir.ui.view: hr_timesheet.portal_my_task_planned_hours_template +DEL ir.ui.view: hr_timesheet.project_sharing_inherit_project_task_view_tree +DEL ir.ui.view: hr_timesheet.project_sharing_project_task_view_search_inherit_timesheet +DEL ir.ui.view: hr_timesheet.rating_rating_view_search_project_inherited +DEL ir.ui.view: hr_timesheet.report_project_task_user_view_search +DEL ir.ui.view: hr_timesheet.report_project_task_user_view_tree +DEL ir.ui.view: hr_timesheet.view_task_search_form_hr_extended diff --git a/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis_work.txt new file mode 100644 index 00000000000..e66cc5bb7b3 --- /dev/null +++ b/openupgrade_scripts/scripts/hr_timesheet/17.0.1.1/upgrade_analysis_work.txt @@ -0,0 +1,30 @@ +---Models in module 'hr_timesheet'--- +new model hr.employee.delete.wizard [transient] +---Fields in module 'hr_timesheet'--- +hr_timesheet / account.analytic.line / ancestor_task_id (many2one) : DEL relation: project.task +hr_timesheet / account.analytic.line / parent_task_id (many2one) : NEW relation: project.task, isrelated: related, stored +hr_timesheet / project.project / timesheet_encode_uom_id (many2one): not related anymore +hr_timesheet / project.project / timesheet_encode_uom_id (many2one): now a function +hr_timesheet / project.update / allocated_time (integer) : NEW +hr_timesheet / project.update / timesheet_time (integer) : NEW +hr_timesheet / project.update / uom_id (many2one) : NEW relation: uom.uom +---XML records in module 'hr_timesheet'--- +DEL ir.actions.act_window.view: hr_timesheet.timesheet_action_view_from_employee_list +NEW ir.actions.server: hr_timesheet.unlink_employee_action +NEW ir.model.access: hr_timesheet.access_hr_employee_delete_wizard +DEL ir.model.access: hr_timesheet.access_project_task +NEW ir.ui.view: hr_timesheet.hr_employee_delete_wizard_form +NEW ir.ui.view: hr_timesheet.hr_timesheet_line_portal_tree +NEW ir.ui.view: hr_timesheet.portal_my_task_allocated_hours_template +NEW ir.ui.view: hr_timesheet.project_update_view_kanban_inherit +NEW ir.ui.view: hr_timesheet.timesheet_view_form_portal_user +NEW ir.ui.view: hr_timesheet.view_employee_tree_inherit_timesheet +NEW ir.ui.view: hr_timesheet.view_kanban_account_analytic_line_portal_user +DEL ir.ui.view: hr_timesheet.portal_my_task_planned_hours_template +DEL ir.ui.view: hr_timesheet.project_sharing_inherit_project_task_view_tree +DEL ir.ui.view: hr_timesheet.project_sharing_project_task_view_search_inherit_timesheet +DEL ir.ui.view: hr_timesheet.rating_rating_view_search_project_inherited +DEL ir.ui.view: hr_timesheet.report_project_task_user_view_search +DEL ir.ui.view: hr_timesheet.report_project_task_user_view_tree +DEL ir.ui.view: hr_timesheet.view_task_search_form_hr_extended +# NOTHING TO DO: No change since 17.0.1.0 diff --git a/openupgrade_scripts/scripts/project_sms/17.0.1.1/noupdate_changes.xml b/openupgrade_scripts/scripts/project_sms/17.0.1.1/noupdate_changes.xml new file mode 100644 index 00000000000..e6112a2f6d8 --- /dev/null +++ b/openupgrade_scripts/scripts/project_sms/17.0.1.1/noupdate_changes.xml @@ -0,0 +1,6 @@ + + + + [('model', 'in', ('project.task', 'project.project'))] + + diff --git a/openupgrade_scripts/scripts/project_sms/17.0.1.1/post-migration.py b/openupgrade_scripts/scripts/project_sms/17.0.1.1/post-migration.py new file mode 100644 index 00000000000..b85f0cc3e25 --- /dev/null +++ b/openupgrade_scripts/scripts/project_sms/17.0.1.1/post-migration.py @@ -0,0 +1,6 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env, "project_sms", "17.0.1.1/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis.txt b/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis.txt new file mode 100644 index 00000000000..eafd7361f74 --- /dev/null +++ b/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis.txt @@ -0,0 +1,4 @@ +---Models in module 'project_sms'--- +---Fields in module 'project_sms'--- +---XML records in module 'project_sms'--- +---nothing has changed in this module-- diff --git a/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis_work.txt new file mode 100644 index 00000000000..9ef5b366d9e --- /dev/null +++ b/openupgrade_scripts/scripts/project_sms/17.0.1.1/upgrade_analysis_work.txt @@ -0,0 +1,5 @@ +---Models in module 'project_sms'--- +---Fields in module 'project_sms'--- +---XML records in module 'project_sms'--- +---nothing has changed in this module-- +# NOTHING TO DO From 1763bceec1a18feeccae34d1399c42520ae54af0 Mon Sep 17 00:00:00 2001 From: Giang Pham Date: Mon, 8 Dec 2025 15:07:33 +0700 Subject: [PATCH 3/3] [FIX] hr_holidays: Data sould be load after field conversion --- .../scripts/hr_holidays/17.0.1.6/post-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/post-migration.py b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/post-migration.py index fc145ff65df..aea1be881c8 100644 --- a/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/post-migration.py +++ b/openupgrade_scripts/scripts/hr_holidays/17.0.1.6/post-migration.py @@ -32,9 +32,9 @@ def _compute_already_accrued(env): @openupgrade.migrate() def migrate(env, version): - openupgrade.load_data(env, "hr_holidays", "17.0.1.6/noupdate_changes.xml") _leave_type_responsible_convert_field_m2o_to_m2m(env) _compute_already_accrued(env) + openupgrade.load_data(env, "hr_holidays", "17.0.1.6/noupdate_changes.xml") openupgrade.delete_records_safely_by_xml_id( env, [