Skip to content

[OU-FIX] base: pre-create ir.actions.server.update_property - #7

Merged
cursor[bot] merged 1 commit into
20.0from
cursor/ou-20-01-server-action-property-3e8f
Nov 12, 2026
Merged

cursor[bot] merged 1 commit into
20.0from
cursor/ou-20-01-server-action-property-3e8f

Conversation

@adekock11

Copy link
Copy Markdown
Owner

Symptom

Loading base on 20.0 crashes:

KeyError: 'helpdesk.ticket'

while computing the new stored field ir.actions.server.update_property. The same crash happens for any object_write server action whose model is not registered with base (any module that loads later).

Root cause

upgrade_analysis_work.txt records:

base / ir.actions.server / update_property (char) : NEW hasdefault: compute

Odoo 20 computes it in _compute_crud_relations → _get_relation_chain, which does self.env[self.model_id.model] (odoo/addons/base/models/ir_actions.py). Stored computed fields are computed when the column is created at model init. helpdesk.ticket (and every non-base model) is not in the registry yet.

NULL is the correct value for every server action written before 20.0. Nothing stored a property name to update.

Change

openupgrade_scripts/scripts/base/20.0.1.3/pre-migration.py calls openupgrade.add_columns for ir.actions.server.update_property (char on ir_act_server) with no default. The ORM then finds the column and does not compute it.

The analysis line is marked # DONE in upgrade_analysis_work.txt.

Fork 20.0 does not yet contain the base migration (it arrives with OCA OCA#6068, already on 20.0-integration). This branch therefore adds a pre-migration whose only step is this column. On a tree that already has the OCA#6068 script, add the ir_actions_server_update_property(env) call at the end of the existing migrate(). That is what 20.0-integration-2 does. The work file in this PR is the OCA#6068 analysis work file plus the two DONE lines, because the file does not exist on fork 20.0.

Verification

Read against Odoo 20 ir.actions.server._compute_crud_relations / _get_relation_chain. ruff is clean. No database upgrade was run.

No OCA pull request pre-creates this column. OCA OCA#6068 adds the analysis line and does not mention the compute.

Upstream

Generic. Submit to OCA 20.0 on top of OCA#6068. Not relevant to 18.0 or 19.0 (the field does not exist there).

Limitation

Server actions that should have a non-NULL update_property do not exist before 20.0, so leaving the column NULL does not drop data. A custom module that already created the column and filled it is left untouched (add_columns does not overwrite an existing column).

Open in Web Open in Cursor 

@cursor
cursor Bot force-pushed the cursor/ou-20-01-server-action-property-3e8f branch from 9acdecf to f2ca81d Compare November 12, 2026 08:44
@cursor
cursor Bot merged commit 7bb3b89 into 20.0 Nov 12, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants