Repository navigation
Build Order Updates - #4855
Merged
SchrodingersGat merged 90 commits intoJun 13, 2023
Merged
Build Order Updates#4855
Conversation
- Represents an instance of a BOM item against a BuildOrder
When a new Build is created, automatically generate new BuildLine items
SchrodingersGat
marked this pull request as draft
May 22, 2023 13:49
Add list and detail API endpoints for new BuildLine model
matmair
approved these changes
May 22, 2023
- Add new model to roles definition
Save database hits by performing a bulk-create
- A "BuildItem" will now be tracked against a BuildLine - Not tracked directly against a build - Not tracked directly against a BomItem - Add schema migration - Add data migration to update links
- bom_item and build fields are about to be removed - Set them to "nullable" so the data doesn't get removed
- build fk - bom_item fk - A lot of other required changes too
- Delete the BuildLine if the BomItem is removed - This is closer to current behaviour
- tracked_bom_items -> tracked_line_items - untracked_bom_items -> tracked_bom_items - remove build.can_complete - move bom_item specific methods to the BuildLine model - Cleanup / consolidation
- Update javascript - Cleanup HTML templates
- Annotate 'allocated' quantity - Filter by allocated / trackable / optional / consumable
- Makes API query *much* faster now - remove old "required_parts_to_complete_build" method - Cleanup part API filter code
SchrodingersGat
added a commit
to inventree/demo-dataset
that referenced
this pull request
Jun 11, 2023
- Migrate data to include new BuildLine model - Ref: inventree/InvenTree#4855
1 of 2 tasks
- Should cut down on DB hits significantly
SchrodingersGat
marked this pull request as ready for review
June 12, 2023 13:19
- Don't hard-code pk values - postgresql no likey
Member
Author
|
@matmair can you give your 2 cents on this issue? For some reason, running the unit testing is generating a new migration file in the "InvenTree" app. IIRC you recently added some migration stuff here, maybe? |
Member
|
The interesting part is why the migration checks go through |
Member
Author
|
If I run the full CI suite locally, I get a new migration file (under InvenTree/migrations) for each run through |
Member
|
Do you have the contents?
…________________________________
From: Oliver ***@***.***>
Sent: Tuesday, June 13, 2023 7:43:04 AM
To: inventree/InvenTree ***@***.***>
Cc: Matthias Mair ***@***.***>; Mention ***@***.***>
Subject: Re: [inventree/InvenTree] Build Order Updates (PR #4855)
If I run the full CI suite locally, I get a new migration file (under InvenTree/migrations) for each run through
—
Reply to this email directly, view it on GitHub<#4855 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APXU7DCAYSQLVKNWEVSCHMLXK74WRANCNFSM6AAAAAAYHLO7HM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Member
Author
|
@matmair for example If I run the CI tests again, I get another migration each time, i.e. 0003, 0004, 0005 |
Member
Author
Member
Author
|
Looks like coveralls is just down in general |
SchrodingersGat
added a commit
to inventree/demo-dataset
that referenced
this pull request
Jun 13, 2023
- Migrate data to include new BuildLine model - Ref: inventree/InvenTree#4855
This was referenced Jun 16, 2023
Merged
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.



A long-needed overhaul of the build and build allocation system.
This PR adds a new build database model, the "BuildLine"
TODO
BuildItem.buildcolumnBuildItem.bom_itemcolumnsubtract_allocated_stockscrap_build_outputcomplete_build_outputtrim_allocated_stockBuildLineinstancehas_untracked_bom_itemsincomplete_bom_itemsbuild.required_quantitymethodbuild.has_overallocated_partsmethodbuild.required_parts_to_complete_buildmethodbuild.unallocateStockmethodloadBuildOutputAllocationTablejavascript function