Skip to content

Conversation

@remi-filament
Copy link
Contributor

Follow-up of #4692 (comment)
When payment providers are duplicated (for being used on another company most of the time), the previous script implementation did not set method_ids on these ones (since it did it only on payment providers with an External ID so created at module installation).

This PR fixes that behaviour by setting payment_method_ids on payment providers based on (in the following order) :

  1. external ID
  2. code
  3. module_id (this one should not be needed since code is required)

Also, I realize that payment_method_ids were not updated for 4 modules (payment_asiapay, payment_ogone, payment_payulatam and payment_payumoney) (since these are not even present in openupgrade_scripts / scripts directory) so I handled those also here.

I also changed readme to set as done all the payment modules which had no other changes.

Eventually, I also took the opportunity to update payment_custom and payment_demo migration scripts (I could not handled these ones in payment directly since only when installed they install their own payment_method).

@MiquelRForgeFlow MiquelRForgeFlow added this to the 17.0 milestone Aug 7, 2025
Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Choose a reason for hiding this comment

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

I have no idea but LGTM 😄

@pedrobaeza pedrobaeza merged commit 181cb99 into OCA:17.0 Aug 11, 2025
3 of 4 checks passed
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