-
-
Notifications
You must be signed in to change notification settings - Fork 232
[18.0][FIX] account_credit_control: correctly update control lines status #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It seems you should squash the first 2 commits together, and why do you need the so called "flexibility" in the tests? You are not explaining the reasons in the commit. |
|
@pedrobaeza honestly I'm not very sure. credit-control/account_credit_control/models/credit_control_policy.py Lines 229 to 230 in c573021
<p>, and I got a <span>. I don't think this was relevant to the test (I could add this to the commit message indeed).This problem wasn't triggered on the runboat, only on my local run (hence why I wrote it's more flexible). I would not squash the 2 first commits because the second one should be cherry-picked for 17.0. I've done it in #468 |
|
Yes, please include in the commit message. |
49d3221 to
8d3082f
Compare
53a7c6a to
47858be
Compare
|
@pedrobaeza Commit: Contains the comment that So a thread is generally assumed to take at most 2 cursors. Because things are launched in their own cursor, this doesn't impact the main request, There is already a way to manage this kind of cases in the OCA that is called If for some reason one would still want the threaded code nonetheless, Note that one test is split into two; although it is better to avoid code duplication, |
|
@sergio-teruel can you check @len-foss' last comment? |
5f51782 to
df86a11
Compare
account_credit_control_queue_job/models/credit_control_communication.py
Outdated
Show resolved
Hide resolved
b18acb3 to
ae9d77b
Compare
qgroulard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me (code review).
Much welcome simplification and improvements.
It would be great to have insight from @sergio-teruel though.
|
@pedrobaeza This is approved and ready to be merged if you or @sergio-teruel want to have a look before merge please say so. |
|
This PR has the |
pedrobaeza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to remove the threaded printing, so @sergio-teruel should check
|
@pedrobaeza would it be ok for you if we merge this with a major version? To me the queue job option in a separate module is way more elegent. |
|
@sergio-teruel should tell. |
…_control_queue_job initialized Since tests first initialize modules then run the tests, this module needs to pass the context key queue_job__no_delay
ae9d77b to
a27f790
Compare
|
@pedrobaeza done |
|
I still see too many commits. For example, there's no sense IMO in having 2 commits about |
|
How expensive are commits? I left because it also adds another dependency. |
|
For me the architecture has gone too far, depending on another more module |
|
What does this mean? The job batch was added on request of @yvaucher. It's in another module that you don't need to install. |
|
Yes, but it's the replacement of the threaded one, so for having the same feature now 3 modules are needed instead of one. I don't see the sense. You can keep the threaded feature being not activated by default, or put that on a separate module, or have a simple replacement, but not this complicated dependency chain. |
|
How is the threading code KISS? If you want to have such a mechanism in place, do it in a custom module that you install when you know you can. Having an OCA dependency being a problem in OCA modules is a very strange point of view. |
|
Well, OK, I'm not saying that, but I abstain of this PR. Proceed as you wish. |
|
This PR has the |
|
/ocabot merge major |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 96a5fcd. Thanks a lot for contributing to OCA. ❤️ |
|
@len-foss thank you for your reactivity. And also thanks to all others involved for their time. As it was approved I proceeded with the merge. I also conclude that if someone needs the threaded version back it should go in a separate module. queue_job is not an easy dependency to setup but in my experience it's a must have in big projects. And it's more likely that big projects need an async feature. So it's good to have it in a separate module. |
|
Thank you @yvaucher (and @qgroulard ), your help was really appreciated 👍 |
This PR is a forward port of #447, and addresses the comment https://github.com/OCA/credit-control/pull/430/files#r1963626501
The state of the control lines should be changed after sending the email, but this wasn't done because there was a check on the subtype.
Another bug that affected this lack of state change was: #426
Because related values weren't flushed, the lines weren't linked to the communication, and so the postprocess would never update their state.