-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Build Order Updates #4855
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
Add list and detail API endpoints for new BuildLine model
- 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
- Migrate data to include new BuildLine model - Ref: inventree/InvenTree#4855
- Should cut down on DB hits significantly
- Don't hard-code pk values - postgresql no likey
@matmair can you give your 2 cents on this issue? https://github.com/inventree/InvenTree/actions/runs/5250684787/jobs/9484929933?pr=4855 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? |
The interesting part is why the migration checks go through |
If I run the full CI suite locally, I get a new migration file (under InvenTree/migrations) for each run through |
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: ***@***.***>
|
@matmair for example If I run the CI tests again, I get another migration each time, i.e. 0003, 0004, 0005 |
Looks like coveralls is just down in general |
- Migrate data to include new BuildLine model - Ref: inventree/InvenTree#4855
A long-needed overhaul of the build and build allocation system.
This PR adds a new build database model, the "BuildLine"
TODO
BuildItem.build
columnBuildItem.bom_item
columnsubtract_allocated_stock
scrap_build_output
complete_build_output
trim_allocated_stock
BuildLine
instancehas_untracked_bom_items
incomplete_bom_items
build.required_quantity
methodbuild.has_overallocated_parts
methodbuild.required_parts_to_complete_build
methodbuild.unallocateStock
methodloadBuildOutputAllocationTable
javascript function