-
-
Notifications
You must be signed in to change notification settings - Fork 692
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
[16.0][ADD] stock_account_move_reset_to_draft: New module #1813
[16.0][ADD] stock_account_move_reset_to_draft: New module #1813
Conversation
Looks like we should converge the ideas. OCA/account-financial-tools#1946 :) |
This one seems more complete, handling all the SVLs adjustments. |
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.
Why "multi" in the module name?
Because you can reset to draft "multiple" times. The standard only allows one. |
I don't see it this way. You can reset a bill to draft multiple times with the standard as long as there is no adjustment SVL, no? |
Yes, correct, but we are referring if you change the price multiple times. That's difficult to be reflected in the technical name, but if you have a nicer name, we are all ears. |
My preference is stock_account_move_force_reset_to_draft but it's not a strong one. I was just curious. |
5fc94b3
to
5a0b36c
Compare
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.
Code LGTM
5a0b36c
to
393a244
Compare
Yes, I think this one is better in terms of reliability and avoid to enforce additional protections on prices changes or ... |
I'm also in favor of not making 'multi' in the name. As, if you do it once, you can dot it more. That's the same principle for all existing modules that reset objects to draft state. But you can add it to USAGE which is a good approach IMHO. |
Then which name? |
393a244
to
ddbfdb6
Compare
Preference for |
OK, let's rename it, but first please do the review for performing all the possible changes at the same time. |
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.
Can you please check my suggestion?
ddbfdb6
to
9c1760c
Compare
@victoralmau @pedrobaeza Could you check @yostashiro comments ? |
Renamed to |
@victoralmau Thanks for the update but I'm not sure where your comment is coming from. If an implementation risks compromising data integrity/consistency, we must do our best to prevent that. No question about it, IMO. |
@pedrobaeza @victoralmau I added some comments here OCA/account-financial-tools#1947 (comment) about an alternative approach which is strictly speaking less accurate, but more tolerant of intervening transactions (e.g. valuation already fixed, sold though etc) and avoids editing svl's. I make no claim that it is better or worse, just food for thought. |
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.
Functional test.
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.
We have a good start with some constraints and amount rectifications code, so let's merge it, and we can improve it later when used in real cases.
/ocabot merge nobump
On my way to merge this fine PR! |
Maybe it's too late now, but there is an issue with the code. We will propose a fix in another PR if it's too late. |
@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-1813-by-pedrobaeza-bump-nobump. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
I have cancelled the CI. Tell us the problem. |
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.
@pedrobaeza Thanks!
This is why the error didn't reproduce: #1813 (comment)
1e71713
to
c07bb95
Compare
Changes done. |
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.
LGTM just with a correction of the license. Thanks!
c07bb95
to
a5e3f54
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
This PR has the |
Congratulations, your PR was merged at 697bc18. Thanks a lot for contributing to OCA. ❤️ |
We have a customer being hit by this. We deployed OCA/account-financial-tools#1962 for them but if @yostashiro looks our code and PR description there and grant us this addon cover the same use case we are open to deploy this and we'll give U feedback about it. |
New module
Please @pedrobaeza and @carlosdauden can you review it?
@Tecnativa TT51201