Skip to content

[16.0][IMP] Update dotfiles to fix pre-commit dependencies issues#1422

Open
ivilata wants to merge 3 commits into
OCA:16.0from
ivilata:16.0-fix-pre-commit-update-dotfiles
Open

[16.0][IMP] Update dotfiles to fix pre-commit dependencies issues#1422
ivilata wants to merge 3 commits into
OCA:16.0from
ivilata:16.0-fix-pre-commit-update-dotfiles

Conversation

@ivilata
Copy link
Copy Markdown

@ivilata ivilata commented Apr 28, 2026

Mainly to avoid ModuleNotFoundError: No module named 'pkg_resources' when running the setuptools-odoo pre-commit hook (e.g. run by CI), as v3.1.8 was bitten by the removal of pkg_resources from recent versions of setuptools. This was fixed by v1.38 of oca-addons-repo-template by updating setuptools-odoo to v3.3.2.

See #1421 for more more information.

Mainly to avoid `ModuleNotFoundError: No module named 'pkg_resources'` when
running the `setuptools-odoo` pre-commit hook, as v3.1.8 was bitten by the
removal of `pkg_resources` from recent versions of `setuptools`.  This was
fixed by v1.38 of `oca-addons-repo-template` by updating `setuptools-odoo` to
v3.3.2.

See OCA#1421 for more more information.
@ivilata
Copy link
Copy Markdown
Author

ivilata commented Apr 28, 2026

As mentioned in the other ticket, KeyError: 'test_target_state' in TestContract tests are pre-existing.

Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Anyway, to merge this, we need to fix the error in the tests.

@ivilata
Copy link
Copy Markdown
Author

ivilata commented Apr 29, 2026

Thanks @pedrobaeza for the review.

Umm… So a merge is not possible if there are unrelated test failures?

I wonder if creating additional PRs for solving the other issues won't work since they will be blocked by this one, while this one is blocked by the others.

In that case, should the fixes to the other problems be included in this PR as well? 🤔

@pedrobaeza
Copy link
Copy Markdown
Member

Yeah, it should be included in this PR.

This includes a couple of `_do_auto_pay` tests which were missing a
`test_target_state` context (added in later commits), and a `_pay_invoice`
test which did not clear the invoice's residual amount.
@OCA-git-bot OCA-git-bot added series:16.0 mod:contract_payment_auto Module contract_payment_auto labels Apr 29, 2026
@ivilata ivilata marked this pull request as draft May 5, 2026 09:44
@OCA-git-bot OCA-git-bot added the mod:subscription_oca Module subscription_oca label May 5, 2026
@ivilata ivilata force-pushed the 16.0-fix-pre-commit-update-dotfiles branch 6 times, most recently from 321f8c5 to 8276633 Compare May 12, 2026 07:55
So that they can pay refunds etc. no matter what account in arbitrarily chosen
when creating an invoice from a subscription.  This avoids "UserError: The
company bank account linked to this invoice is not trusted, please
double-check and trust it before confirming, or remove it" in
`TestSubscriptionOCA.test_subscription_oca_sub8_workflow`.
@ivilata ivilata force-pushed the 16.0-fix-pre-commit-update-dotfiles branch from 8276633 to 6163e0a Compare May 12, 2026 08:33
@ivilata ivilata marked this pull request as ready for review May 12, 2026 08:54
@ivilata ivilata requested a review from pedrobaeza May 12, 2026 08:55
@ivilata
Copy link
Copy Markdown
Author

ivilata commented May 12, 2026

@pedrobaeza: It took me some time, but at last I was able to fix the remaining unit test errors. I understand that, since the fixes are unrelated but need to be pushed in a single blow to avoid the chicken-and-egg situation mentioned above, it's better not to squash them together.

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

Labels

mod:contract_payment_auto Module contract_payment_auto mod:subscription_oca Module subscription_oca series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants