Support physical units for BOM lines#11631
Open
SchrodingersGat wants to merge 22 commits intoinventree:masterfrom
Open
Support physical units for BOM lines#11631SchrodingersGat wants to merge 22 commits intoinventree:masterfrom
SchrodingersGat wants to merge 22 commits intoinventree:masterfrom
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11631 +/- ##
==========================================
- Coverage 91.34% 91.33% -0.02%
==========================================
Files 967 968 +1
Lines 50277 50357 +80
==========================================
+ Hits 45928 45996 +68
- Misses 4349 4361 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…Tree into physical-bom-lines
SchrodingersGat
added a commit
to inventree/inventree-wireviz
that referenced
this pull request
Apr 12, 2026
- Allows for forwards / backwards compatibility - Ref: inventree/InvenTree#11631
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for physical units in BOM items.
Breaking Change
The "quantity" field on the BOMItem model is now calculated based on the provided "raw_amount" field - any plugins which are trying to write directly to the "quantity" field will experience errors.
Plugins should either write to the "raw_amount" field directly, or use the new "set_quantity" helper method on the BOMItem model.
API Change
This PR introduces a new "raw_amount" field to the BomItem API - which is preferenced over the "quantity" field. However, if only the "quantity" field is provided, it will be used, to allow backwards compatibility with existing systems.
Tasks