From 591f24877a710e43585cf756ab5c72204a5775bb Mon Sep 17 00:00:00 2001 From: sergio-teruel Date: Fri, 16 Oct 2026 09:13:36 +0200 Subject: [PATCH] [OU-FIX] base: create missing cron server action XML IDs When a record with an XML ID is created, Odoo also creates the XML ID `_` of its `_inherits` parent, but crons created by old versions lack the one of their server action. This happens on databases started in 10.0 or earlier, whose crons got their server action in the 11.0 migration. 18.0 is the first version whose data references them (stock.ir_cron_scheduler_action_ir_actions_server in the stock and mrp procurement menus), so updating stock fails with "External ID not found in the system". They are added with the generic openupgradelib add_inherits_parent_xmlids. Co-Authored-By: Claude Opus 5.5 --- openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py b/openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py index c16b384f4e96..b15707df3116 100644 --- a/openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py +++ b/openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py @@ -95,3 +95,8 @@ def migrate(cr, version): _fix_list_view_mode(cr) _fix_serbian_res_lang_record(cr) _fix_company_layout_background(cr) + # Crons created before 11.0 lack the XML ID of their server action, + # referenced by the stock and mrp procurement menus since 18.0 + openupgrade.add_inherits_parent_xmlids( + cr, "ir.cron", "ir.actions.server", "ir_actions_server_id" + )