Repository navigation
[OU-FIX] base: pre-create ir.actions.server.update_property - #7
Merged
Merged
Conversation
Co-authored-by: André de Kock <[email protected]>
cursor
Bot
force-pushed
the
cursor/ou-20-01-server-action-property-3e8f
branch
from
November 12, 2026 08:44
9acdecf to
f2ca81d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
Loading
baseon 20.0 crashes:while computing the new stored field
ir.actions.server.update_property. The same crash happens for anyobject_writeserver action whose model is not registered withbase(any module that loads later).Root cause
upgrade_analysis_work.txtrecords:Odoo 20 computes it in
_compute_crud_relations→_get_relation_chain, which doesself.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.pycallsopenupgrade.add_columnsforir.actions.server.update_property(charonir_act_server) with no default. The ORM then finds the column and does not compute it.The analysis line is marked
# DONEinupgrade_analysis_work.txt.Fork
20.0does not yet contain the base migration (it arrives with OCA OCA#6068, already on20.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 their_actions_server_update_property(env)call at the end of the existingmigrate(). That is what20.0-integration-2does. 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 fork20.0.Verification
Read against Odoo 20
ir.actions.server._compute_crud_relations/_get_relation_chain.ruffis 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.0on 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_propertydo 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_columnsdoes not overwrite an existing column).