TIP: You can type at any time to perform a new search.
Upgrade Analysis
upgrade_analysis · OCA/server-tools
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `INSERT INTO upgrade_record (create_date, module, model, field, mode, type) VALUES (NOW() AT TIME ZONE 'UTC', %s, %s, %s, %s, %s)` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `INSERT INTO upgrade_record (create_date, module, model, name, type) values(NOW() AT TIME ZONE 'UTC', %s, %s, %s, %s)` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `INSERT INTO upgrade_attribute (create_date, name, value, record_id) VALUES (NOW() AT TIME ZONE 'UTC', %s, %s, %s)` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE upgrade_record our SET domain = iaw.domain FROM ir_model_data imd JOIN ir_act_window iaw ON imd.res_id = iaw.id WHERE our.type = 'xmlid' AND imd.model = 'ir.actions.act_window' AND our.model = imd.model AND our.name = imd.module || '.' || imd.name` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE upgrade_record our SET definition = btrim(replace(replace(replace(replace( imc.definition, chr(9), ' '), chr(10), ' '), ' ', ' '), ' ', ' ')) FROM ir_model_data imd JOIN ir_model_constraint imc ON imd.res_id = imc.id WHERE our.type = 'xmlid' AND imd.model = 'ir.model.constraint' AND our.model = imd.model AND our.name = imd.module || '.' || imd.name` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE upgrade_record our SET noupdate = imd.noupdate FROM ir_model_data imd WHERE our.type = 'xmlid' AND our.model = imd.model AND our.name = imd.module || '.' || imd.name` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `INSERT INTO upgrade_record (create_date, module, name, model, type) SELECT NOW() AT TIME ZONE 'UTC', imd2.module, imd2.module || '.' || imd.name AS name, im.model, 'model' AS type FROM ( SELECT min(id) as id, name, res_id FROM ir_model_data WHERE name LIKE 'model_%' AND model = 'ir.model' GROUP BY name, res_id ) imd JOIN ir_model_data imd2 ON imd2.id = imd.id JOIN ir_model im ON imd.res_id = im.id ORDER BY imd.name, imd.id` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- Category
- Migration
- Folder size
- 0.24 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-tools
- Last tracking update
- 2026-10-01 07:34:50
- Authors
- Odoo Community Association (OCA), Therp BV, GRAP, Opener B.V.
- Maintainers
- Odoo Community Association (OCA), Therp BV, GRAP, Opener B.V.
- Committers
- Holger Brunn, Miquel Raïch, OCA-git-bot, oca-ci, iam-piyush, Kunal Shukla
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- dataclasses, odoorpc, openupgradelib
- System dependencies
- None
- Required by
- None
- Description
This module provides the tool to generate the database analysis files that indicate how the Odoo data model and module data have changed between two versions of Odoo. Database analysis files for the core modules are included in the OpenUpgrade distribution so as a migration script developer you will not usually need to use this tool yourself. If you do need to run your analysis of a custom set of modules, please refer to the documentation here: <https://oca.github.io/OpenUpgrade/070_migration_files.html#generate-the-difference-analysis-files> This module is just a tool, a continuation of the old openupgrade_records in OpenUpgrade in previous versions. It's not recommended to have this module in a production database.
Code Analysis
Views touched (10)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
module_coverage |
module_coverage | ir.ui.view | qweb | New |
view_upgrade_analysis_form |
upgrade.analysis | form | New | |
view_upgrade_analysis_tree |
upgrade.analysis | list | New | |
view_upgrade_comparison_config_form |
upgrade.comparison.config | form | New | |
view_upgrade_comparison_config_tree |
upgrade.comparison.config | list | New | |
view_upgrade_generate_record_wizard_form |
upgrade.generate.record.wizard | form | New | |
view_upgrade_install_wizard_form |
upgrade.install.wizard | form | New | |
view_upgrade_record_form |
upgrade.record | form | New | |
view_upgrade_record_search |
upgrade.record | search | New | |
view_upgrade_record_tree |
upgrade.record | list | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (7)
New fields (2)
-
is_oca_moduleBooleancompute='_compute_is_oca_module' -
is_odoo_moduleBooleancompute='_compute_is_odoo_module'
No public methods.
New fields (6)
-
analysis_dateDatetimereadonly=True -
config_idMany2one → upgrade.comparison.configcomodel_name='upgrade.comparison.config'readonly=Truerequired=Truestring='Comparison Config' -
logTextreadonly=True -
stateSelectiondefault='draft'readonly=True args: [('draft', 'draft'), ('done', 'Done')] -
upgrade_pathCharcompute='_compute_upgrade_path'help="The base file path to save the analyse files of Odoo modules. Taken from Odoo's --upgrade-path command line option or the 'scripts' subdirectory in the openupgrade_scripts addon."readonly=Falsestore=True -
write_filesBooleandefault=Truehelp='Write analysis files to the module directories'
-
analyze(self)Retrieve both sets of database representations, perform the comparison and register the resulting change set -
generate_module_coverage_file(self, no_changes_modules) -
generate_noupdate_changes(self, moved_xml_records, renamed_xml_records, modified_xml_records)Communicate with the remote server to fetch all xml data records per module, and generate a diff in XML format that can be imported from the module's migration script using openupgrade.load_data()
New fields (3)
-
nameCharreadonly=True -
record_idMany2one → upgrade.recordcomodel_name='upgrade.record'index=Trueondelete='CASCADE'readonly=True -
valueCharreadonly=True
No public methods.
New fields (9)
-
analysis_idsOne2many → upgrade.analysiscomodel_name='upgrade.analysis'inverse_name='config_id'string='Analyses' -
analysis_qtyIntegercompute='_compute_analysis_qty' -
databaseCharrequired=True -
nameChar -
passwordChardefault='admin'required=True -
portIntegerdefault=8069required=True -
serverChardefault='localhost'required=True -
usernameChardefault='admin'required=True -
versionChar
-
action_show_analysis(self) -
get_connection(self) -
new_analysis(self) -
test_connection(self)
New fields (1)
-
stateSelectiondefault='draft' args: [('draft', 'Draft'), ('done', 'Done')]
-
generate(self)Reinitialize all installed modules. Equivalent of running the server with '-d <database> --init all' The goal of this is to fill the records table. TODO: update module list and versions, then update all modules?
New fields (3)
-
module_idsMany2many → ir.module.modulecomodel_name='ir.module.module'domain=<expr>string='Modules' -
module_qtyIntegercompute='_compute_module_qty'string='Modules Quantity' -
stateSelectiondefault='draft'readonly=True args: [('draft', 'Draft'), ('done', 'Done')]
-
install_modules(self)Set all selected modules and actually install them. -
return_same_form_view(self) -
select_installable_modules(self, extra_domain=None) -
select_oca_modules(self, extra_domain=None) -
select_odoo_modules(self, extra_domain=None) -
select_other_modules(self, extra_domain=None) -
unselect_modules(self)
New fields (14)
-
attribute_idsOne2many → upgrade.attributecomodel_name='upgrade.attribute'inverse_name='record_id'readonly=True -
definitionCharreadonly=True -
domainCharreadonly=True -
fieldCharreadonly=True -
modeSelectionhelp='Set to Create if a field is newly created in this module. If this module modifies an attribute of an existing field, set to Modify.'readonly=True args: [('create', 'Create'), ('modify', 'Modify')] -
modelCharreadonly=True -
model_original_moduleCharcompute='_compute_model_original_module' -
model_typeCharcompute='_compute_model_type' -
moduleCharreadonly=True -
nameCharreadonly=True -
noupdateBooleanreadonly=True -
prefixCharcompute='_compute_prefix_and_suffix' -
suffixCharcompute='_compute_prefix_and_suffix' -
typeSelectionreadonly=True args: [('field', 'Field'), ('xmlid', 'XML ID'), ('model', 'Model')]
-
field_dump(self)@api.model -
get_xml_records(self, module)@api.modelReturn all XML records from the given module -
list_modules(self)@api.modelReturn the set of covered modules
Loading…
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- checks failing
- Open since
- 6 days ago
- Last activity
- 4 days ago
- Repository
- OCA/server-tools
- Pull request
- [20.0][MIG] upgrade_analysis (#3748)