[16.0][IMP] Update dotfiles to fix pre-commit dependencies issues#1422
[16.0][IMP] Update dotfiles to fix pre-commit dependencies issues#1422ivilata wants to merge 3 commits into
Conversation
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.
|
As mentioned in the other ticket, |
pedrobaeza
left a comment
There was a problem hiding this comment.
Anyway, to merge this, we need to fix the error in the tests.
|
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? 🤔 |
|
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.
321f8c5 to
8276633
Compare
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`.
8276633 to
6163e0a
Compare
|
@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. |
Mainly to avoid
ModuleNotFoundError: No module named 'pkg_resources'when running thesetuptools-odoopre-commit hook (e.g. run by CI), as v3.1.8 was bitten by the removal ofpkg_resourcesfrom recent versions ofsetuptools. This was fixed by v1.38 ofoca-addons-repo-templateby updatingsetuptools-odooto v3.3.2.See #1421 for more more information.