-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Fix build item over-allocation checks #8235
Fix build item over-allocation checks #8235
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
a5028d2
to
c3b6369
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8235 +/- ##
=======================================
Coverage 84.24% 84.25%
=======================================
Files 1157 1157
Lines 52347 52373 +26
Branches 1892 1892
=======================================
+ Hits 44100 44125 +25
- Misses 7789 7790 +1
Partials 458 458
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@fuzeman thanks for the fix, looks like a pretty subtle one to work out! |
(cherry picked from commit a1024f1)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
This pull request fixes an issue with
BuildItem
over-allocation checks which prevent allocation changes to over-allocated items. Looking a bit closer at related code it appearsSalesOrderAllocation
already handled this correctly, and I've aligned these changes with that implementation.Not sure if this is a concern but I noticed the quantity checks between
BuildItem
andSalesOrderAllocation
don't appear to be aligned with one casting todecimal.Decimal
and the other not. Not sure if this is breaking anything, but it doesn't look quite right to me.InvenTree/src/backend/InvenTree/build/models.py
Lines 1609 to 1617 in f8c7635
InvenTree/src/backend/InvenTree/order/models.py
Lines 2014 to 2025 in f8c7635