Skip to content

Conversation

@Honeyxilia
Copy link

@Honeyxilia Honeyxilia commented Dec 12, 2025

From Odoo v11.0, ir.cron possesses delegated fields from ir.actions.server related to models, model_id and model_name.
The migration script currently assigns the model_id value, but not the model_name.

This is problematic, as from 11.0's version of base, the model_name from ir.servers.action is a stored field, and since the server action record is inserted directly as a row in the PSQL table, the model_name field is initially set to null, and not recomputed within Odoo to match the model_id's model field.

This can cause issues in later versions of Odoo, such as Odoo 16.0, where the model_name field is used within the run method of ir.actions.server in the base module.

As such, alongside the server action row insertion, we also set model_name to its intended value (model from the ir_model table).

From Odoo v11.0, ir.cron possesses delegated fields from ir.actions.server related to models,
model_id and model_name.
The migration script currently assigns the model_id value, but not the model_name.

This is problematic, as from 11.0's version of base, the model_name from ir.servers.action is a stored field,
and since the server action record is inserted directly as a row in the PSQL table, the model_name field is initially set to null,
and not recomputed within Odoo to match the model_id's model field.

As such, alongside the server action row insertion, we also set model_name to its intended value (model from the ir_model table).
@hbrunn
Copy link
Member

hbrunn commented Dec 13, 2025

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 11.0-ocabot-merge-pr-5470-by-hbrunn-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 13, 2025
Signed-off-by hbrunn
@pedrobaeza pedrobaeza added this to the 11.0 milestone Jan 1, 2026
@pedrobaeza pedrobaeza merged commit bdad989 into OCA:11.0 Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants