Skip to content

Allocate mixin - #12914

Merged
SchrodingersGat merged 6 commits into
inventree:masterfrom
SchrodingersGat:allocate-mixin
Sep 22, 2026
Merged

SchrodingersGat merged 6 commits into
inventree:masterfrom
SchrodingersGat:allocate-mixin

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

Closes #11678

Adds a new plugin mixin class which supports customization of auto-allocation against orders. Plugins can choose to adjust the auto-allocated / auto-selected stock, which allows low level control of how auto-allocation functions, without imposing limitations or complex configuration of default InvenTree behaviour

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Sep 22, 2026
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature order Related to purchase orders / sales orders plugin Plugin ecosystem build Build orders documentation labels Sep 22, 2026
@netlify

netlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit c10425f
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6ab27f961fba860008f769dd

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.19%. Comparing base (499c4d5) to head (c10425f).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12914      +/-   ##
==========================================
- Coverage   86.44%   86.19%   -0.25%     
==========================================
  Files        1469     1472       +3     
  Lines      100566   101160     +594     
  Branches    11141    11141              
==========================================
+ Hits        86934    87199     +265     
- Misses      13566    13895     +329     
  Partials       66       66              
Flag Coverage Δ
backend 92.02% <95.00%> (+0.04%) ⬆️

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

Components Coverage Δ
Backend Apps 92.08% <95.00%> (-0.54%) ⬇️
Backend General 94.90% <ø> (+0.07%) ⬆️
Frontend 77.02% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me;
Maybe it makes sense in a separate PR to create a allocation state machine that tracks how these decisions are made and move the whole thing out of the model?

@SchrodingersGat
SchrodingersGat merged commit a4518fb into inventree:master Sep 22, 2026
48 checks passed
@SchrodingersGat
SchrodingersGat deleted the allocate-mixin branch September 22, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build orders documentation enhancement This is an suggested enhancement or new feature order Related to purchase orders / sales orders plugin Plugin ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] auto allocate stock with priority

2 participants