Skip to content

[16.0][MIG] contract_payment_auto: Migration to 16.0#1231

Merged
OCA-git-bot merged 27 commits into
OCA:16.0from
9184Lucky:16.0-mig-contract_payment_auto
Sep 15, 2025
Merged

[16.0][MIG] contract_payment_auto: Migration to 16.0#1231
OCA-git-bot merged 27 commits into
OCA:16.0from
9184Lucky:16.0-mig-contract_payment_auto

Conversation

@9184Lucky
Copy link
Copy Markdown

No description provided.

@9184Lucky 9184Lucky force-pushed the 16.0-mig-contract_payment_auto branch 2 times, most recently from 6204ed6 to 38deab5 Compare April 30, 2025 10:36
@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration contract_payment_auto

@rousseldenis
Copy link
Copy Markdown
Contributor

@9184Lucky Could you improve your commits messages in order to make module name appear in it ?

Like [IMP] contract_payment_auto: (...)

image

Moreover, if you think some can be squashed with migration one, it could be great.

lasley and others added 22 commits June 13, 2025 16:06
…en (OCA#167)

When a contrat had no payment token but the corresponding partner had
one, the transaction was created without an acquirer, leading to an
integrity error in postgres.

This change makes sure the token used to test the ability to pay an
invoice is passed along to the transaction creation call.

Tests were also added to check the ability to use the contract token if
present, but the partner's in the opposite case.

This change fixes OCA#165.
Currently translated at 100.0% (25 of 25 strings)

Translation: contract-10.0/contract-10.0-contract_payment_auto
Translate-URL: https://translation.odoo-community.org/projects/contract-10-0/contract-10-0-contract_payment_auto/de/
The `_recurring_create_invoice` contract method returns multiple
invoices potentially coming from different contracts, which may have
different values for their `is_auto_pay` attribute.

Without this patch, this case simply crashes (a unit test with more than
one contract to be invoiced is a must-have in this module!).
Change the mock method to patch the Contract class instead of the contract object:
patching the object is less reliable and depends on the implementation too much.
This implementation changed and the tests were no more working. Mocking the class
method fixes the problem.
The payment acquirer API requires an implementation of a _get_feature_support
method. This is done using a temporary mock where required.
Also pass the invoice to the transaction reference computation mecanism
so that it reflects the invoice's number.
louck added 5 commits June 13, 2025 16:06
This allows a cleaner overriding of _send_payment_request and improve
code readability.
Initial purpose was to pass tests on a database with
l10n module installed but it also simplifies the setUpClass method.
@9184Lucky
Copy link
Copy Markdown
Author

@rousseldenis Done ! I squashed all commit directly related to migration and fixed the other's messages.

If anyone feels that some other commit should be merged feel free to asks but i think the ones I left were improvement more than migration...

@rousseldenis
Copy link
Copy Markdown
Contributor

@9184Lucky Not yet pushed 😅

@9184Lucky 9184Lucky force-pushed the 16.0-mig-contract_payment_auto branch from 38deab5 to 60087a5 Compare June 13, 2025 14:22
@9184Lucky
Copy link
Copy Markdown
Author

Oups ^^'

@9184Lucky
Copy link
Copy Markdown
Author

@rousseldenis I pushed the new version but forgot to ping you, sorry !

@rousseldenis
Copy link
Copy Markdown
Contributor

@rousseldenis I pushed the new version but forgot to ping you, sorry !

No problem. I'll check this later today

Copy link
Copy Markdown

@Honeyxilia Honeyxilia left a comment

Choose a reason for hiding this comment

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

LGTM (code review)

Copy link
Copy Markdown
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

LGTM

@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1231-by-rousseldenis-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 7112579 into OCA:16.0 Sep 15, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 639692a. 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.