Repository navigation
Conversation
Assisted-by: Claude Opus 5
dnplkndll
force-pushed
the
20.0-mig-payment
branch
from
September 24, 2026 00:06
49dd371 to
16159ab
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.
payment_method_idswas a many2many in 19.0, so onepayment.methodrecordserved every provider of every company. 20.0 makes it a one2many and each
provider owns its own copies —
payment.provider.copy()creates them when afresh install duplicates a provider into a company.
An upgrade never calls
copy(). On the 585-module seed only the 16providers the module data names came out with methods, and all 117 companies but
one were left with none. The only symptom in the log was one line the upgrade
does not fail on:
The fix
end-migrationreplays that copy against the 19.0 relation table, whichpre-migrationrenames and unhooks from its foreign keys so that deleting theobsolete methods cannot empty the evidence. Result on the seed: 32250 methods
across 2090 providers and all 117 companies.
rename_tablesis deliberately not used for that rename: it renames theconstraints too, and both foreign key names prefixed with the legacy name
truncate to the same 63-character identifier, so the second rename collides with
the first.
The 19.0 records themselves are provider-agnostic and have no place in 20.0.
Transactions and tokens are moved onto their own provider's method of the same
code first; anything still referenced is left alone rather than cascading a
delete into a customer's history.
The transformation file
The analyser sees the 20.0 data files no longer setting
payment_method_idsandemits
eval="None". On a one2many that does not clear a relation table — itunlinks the provider's payment methods, and core refuses with "You cannot
delete the default payment method."
noupdate_changes-transformation.xmldropsthose nodes.
Known gap
8 custom providers are still left without methods and say so via
openupgrade.message: 19.0 had three custom modes (wire_transfer,cash_on_delivery,on_site) and 20.0 ships two against providers 19.0 neverhad. That is a
payment_customquestion and is deliberately not answered here.Draft until fork CI is green on this branch alone. Depends on #119 for the rest
of the analysis sweep.
AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.
CI: red by construction until #118 lands
The
testjob fails onduplicate key value violates unique constraint "res_country_state_name_code_uniq"(Ladakh / Odisha). That is not this branch:base's pre-migration, which renamesbase.state_in_or→base.state_in_odand
l10n_in.state_in_la→base.state_in_la, lives in #118 and is not on20.0yet. Every branch cut from20.0alone hits it, which is why #117 is redfor the same reason.
Per the fork's model the per-PR
testcheck is the lean one; the real migrationgate is the integration branch (#120), where this module's scripts run green as
part of the full 585-module seed.