Upgrade Analysis
upgrade_analysis · OCA/server-tools
openupgrade_records (14.0)-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 7 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
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. (3 occurrences in this file) 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. (4 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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.
Dependencies
- Odoo dependencies
- Python dependencies
- odoorpc, openupgradelib
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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
-
is_oca_moduleBooleancompute='_compute_is_oca_module' -
is_odoo_moduleBooleancompute='_compute_is_odoo_module'
No public methods.
-
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()
-
nameCharreadonly=True -
record_idMany2one → upgrade.recordcomodel_name='upgrade.record'index=Trueondelete='CASCADE'readonly=True -
valueCharreadonly=True
No public methods.
-
analysis_idsOne2many → upgrade.analysiscomodel_name='upgrade.analysis'inverse_name='config_id'string='Analyses' -
analysis_qtyIntegercompute='_compute_analysis_qty' -
api_keyCharhelp='If you connect to v19+ and your version of odoorpc supports it, fill in an api key here instead of username and password' -
databaseCharrequired=True -
nameChar -
passwordChardefault='admin' -
portIntegerdefault=8069required=True -
serverChardefault='localhost'required=True -
usernameChardefault='admin' -
versionChar
-
action_show_analysis(self) -
get_connection(self) -
new_analysis(self) -
test_connection(self)
-
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?
-
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)
-
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…
Loading…