-
Notifications
You must be signed in to change notification settings - Fork 29.8k
[13.0][FIX] mrp_subcontracting: Consume after producing #75065
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
[13.0][FIX] mrp_subcontracting: Consume after producing #75065
Conversation
@amoyaux Can you please take a look to this? Another fix coming soon. |
4e8dc72
to
ac68541
Compare
This comment has been minimized.
This comment has been minimized.
630ac5f
to
2bf5017
Compare
@amoyaux can you please take a look to this? |
2bf5017
to
32b35ca
Compare
Thanks for the tip. Aren't we causing a problem with that? Why it should be removed? |
32b35ca
to
e4557ff
Compare
As I understand, when we do overprocess for subcontract receipt and then close subcontract MO it is needed in order to set new qty to produce in Subcontract MO. |
e4557ff
to
e9a8942
Compare
@kos94ok-3D your reasoning seems correct. Thanks. @amoyaux this one is ready. |
With previous code, the call to super is done before doing all the producing stuff, so the consumption takes place before the stock is available. This is not a problem if you don't have any kind of negative stock levels control, as first a negative quant is created, and when the production is done, the negative quant is neutralized. But if you start using the OCA module stock_no_negative, then the negative stock exception raises, and you are not able to finish the subcontracting reception. Swapping the super call order, means another thing: the backorder is created after the producing code, so we need to filter out the lines that we are not being received. A new test has been included for checking the partial reception flow. @Tecnativa TT75065
e9a8942
to
721b495
Compare
Dear @pedrobaeza, Thank you for your contribution but the version 13.0 is no longer supported. We apology if we could not look at your request in time. This is an automated message. |
With previous code, the call to super is done before doing all the producing stuff, so the consumption takes place before the stock is available. This is not a problem if you don't have any kind of negative stock levels control, as first a negative quant is created, and when the production is done, the negative quant is neutralized.
But if you start using the OCA module
stock_no_negative
, then the negative stock exception raises, and you are not able to finish the subcontracting reception.Swapping the super call order, means another thing: the backorder is created after the producing code, so we need to filter out the lines that are not being received.
A new test has been included for checking the partial reception flow.
@Tecnativa TT31389