Skip to content

[ADD] partner_autocomplete: cleanup obsolete res.partner/res.company fields#74

Open
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-partner-autocomplete-cleanup
Open

[ADD] partner_autocomplete: cleanup obsolete res.partner/res.company fields#74
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-partner-autocomplete-cleanup

Conversation

@dnplkndll
Copy link
Copy Markdown

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:

  • 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.

@dnplkndll dnplkndll force-pushed the 19.0-fix-partner-autocomplete-cleanup branch 2 times, most recently from b3ff658 to c745146 Compare May 30, 2026 02:26
…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.
@dnplkndll dnplkndll force-pushed the 19.0-fix-partner-autocomplete-cleanup branch from c745146 to 9149018 Compare May 30, 2026 03:16
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.

1 participant