[ADD] partner_autocomplete: cleanup obsolete res.partner/res.company fields#74
Open
dnplkndll wants to merge 1 commit into
Open
[ADD] partner_autocomplete: cleanup obsolete res.partner/res.company fields#74dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
b3ff658 to
c745146
Compare
…fields The 18.0 partner_autocomplete module added three fields that no longer exist in 19.0: - res.company.partner_gid - res.partner.additional_info - res.partner.partner_gid Per upgrade_analysis.txt those are DEL. The script directory previously contained only upgrade_analysis.txt — no pre-migration.py and no upgrade_analysis_work.txt — so the migration relied on Odoo's standard upgrade flow to clean up the stale ir_model_fields rows and the matching inheritance views (view_partner_simple_form_inherit_partner_autocomplete, view_res_partner_form_inherit_partner_autocomplete, both also DEL in the analysis). That flow does not in fact prune them — the rows survive and trip cross-cutting view validation when later modules' data XML loads (reproduced on l10n_ae/data/account_tax_report_data.xml:3 with the error "Field 'partner_gid' does not exist in model 'res.partner'"). Add a pre-migration that deletes the stale field xml_ids + the orphan view xml_ids via openupgrade.delete_records_safely_by_xml_id, and a companion upgrade_analysis_work.txt that annotates the analysis blocks. Reproduced and verified on the same fresh 18.0 CE-all install used for the hr companion PR; with this patch and the hr/loyalty companions applied, the migration progresses past the previous crash point and continues into the next module's load.
c745146 to
9149018
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.
Migration work on the ledoent/OpenUpgrade fork (internal review). Rebased onto current 19.0.
The 18.0 partner_autocomplete module added three fields that no longer
exist in 19.0:
Per upgrade_analysis.txt those are DEL. The script directory previously
contained only upgrade_analysis.txt — no pre-migration.py and no
upgrade_analysis_work.txt — so the migration relied on Odoo's standard
upgrade flow to clean up the stale ir_model_fields rows and the matching
inheritance views (view_partner_simple_form_inherit_partner_autocomplete,
view_res_partner_form_inherit_partner_autocomplete, both also DEL in the
analysis). That flow does not in fact prune them — the rows survive and
trip cross-cutting view validation when later modules' data XML loads
(reproduced on l10n_ae/data/account_tax_report_data.xml:3 with the error
"Field 'partner_gid' does not exist in model 'res.partner'").
Add a pre-migration that deletes the stale field xml_ids + the orphan
view xml_ids via openupgrade.delete_records_safely_by_xml_id, and a
companion upgrade_analysis_work.txt that annotates the analysis blocks.
Reproduced and verified on the same fresh 18.0 CE-all install used for
the hr companion PR; with this patch and the hr/loyalty companions
applied, the migration progresses past the previous crash point and
continues into the next module's load.