InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

[WIP] Build order consume

Open SchrodingersGat opened this issue 1 year ago β€’ 2 comments

This is a large(ish) feature branch which allows stock to be consumed by a build order before the build order is complete.

This allows more complex (and useful) workflows, where the build might take some significant time, but the stock is consumed at the start. e.g. a batch of PCBs are loaded, but then require a lot of testing, etc.

Currently, the allocated stock must "languish" in the build order, and this makes tracking of real stock quantities difficult.

Given that this feature might take a while to integrate and test, I am targetting it (for now at least) against 1.0.0. This will not be implemented in the legacy user interface.

TODO

  • [ ] Update documenation around new workflows
  • [ ] PUI updates
  • [ ] Playwright testing
  • [ ] Updated unit testing
  • [ ] Ensure partial allocation vs partial consumption works well
  • [ ] Add data migration for "old" build orders which did not have this field
  • [ ] Add dummy data to the demo dataset
  • [ ] Ensure that the "REQUIRED" counts still make sense (take "consumed" into account)
  • [ ] Check that the "required" counts are correct in the API (unit testing)
  • [ ] Ensure table filters work correctly for the build-line table

SchrodingersGat avatar Sep 26 '24 10:09 SchrodingersGat

Deploy Preview for inventree-web-pui-preview ready!

Name Link
Latest commit e0da640f4292eae10c3d02c88e12356c6695f4e8
Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/68a404487de65d0008d1a123
Deploy Preview https://deploy-preview-8191--inventree-web-pui-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 97 (no change from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Sep 26 '24 10:09 netlify[bot]

Codecov Report

:x: Patch coverage is 91.32653% with 17 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 87.12%. Comparing base (698249e) to head (e0da640). :warning: Report is 300 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8191      +/-   ##
==========================================
- Coverage   87.14%   87.12%   -0.03%     
==========================================
  Files        1258     1259       +1     
  Lines       55966    56269     +303     
  Branches     2078     2072       -6     
==========================================
+ Hits        48773    49024     +251     
- Misses       6682     6735      +53     
+ Partials      511      510       -1     
Flag Coverage Ξ”
backend 88.84% <91.32%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Backend Apps 91.36% <91.28%> (-0.08%) :arrow_down:
Backend General 93.55% <ΓΈ> (-0.09%) :arrow_down:
Frontend 70.07% <ΓΈ> (+0.01%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 26 '24 10:09 codecov[bot]