Skip to content

[19.0][FIX] upgrade_analysis: don't generate invalid noupdate xml for discarded field values - #3535

Merged
OCA-git-bot merged 1 commit into
OCA:19.0from
hbrunn:19.0-upgrade_analysis-falsy-value-for-discarded-value
Mar 3, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:19.0from
hbrunn:19.0-upgrade_analysis-falsy-value-for-discarded-value

Conversation

@hbrunn

@hbrunn hbrunn commented Mar 2, 2026

Copy link
Copy Markdown
Member

in v18, there's currencies set on payment's payment_method_bank_transfer record: https://github.com/OCA/OCB/blob/18.0/addons/payment/data/payment_method_data.xml#L593

in v19, no currencies are set: https://github.com/OCA/OCB/blob/19.0/addons/payment/data/payment_method_data.xml#L565

which generates

<field name="supported_currency_ids"/>

in noupdate_changes.xml. But this amounts to writing '' on a many2many field, which fails as that's an invalid value for this field type.

So here I propose to write whatever the field's NULL value is instead, ensuring we generically empty that field in such a case.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @legalsylvain, @StefanRijnhart,
some modules you are maintaining are being modified, check this out!

@hbrunn hbrunn mentioned this pull request Mar 2, 2026
1 task
@pedrobaeza pedrobaeza added this to the 19.0 milestone Mar 2, 2026

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is not wrong probably, but could you explain/clarify my doubts?

Comment thread upgrade_analysis/models/upgrade_analysis.py
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-3535-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 40180a5 into OCA:19.0 Mar 3, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 00567e4. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants