Skip to content

Supplier Part Updates - #11303

Merged
SchrodingersGat merged 25 commits into
inventree:masterfrom
SchrodingersGat:default-supplier-part
Feb 20, 2026
Merged

SchrodingersGat merged 25 commits into
inventree:masterfrom
SchrodingersGat:default-supplier-part

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Feb 12, 2026 •

Copy link
Copy Markdown
Member

Currently the "primary" supplier part for a given "part" is specified on the Part model itself, which is contrary to the data pattern we use for other tables, which keeps them "self contained".

This PR does the following:

  • Add a primary field to the SupplierPart model
  • Migrate default_supplier info from Part model to the new field
  • Remove the default_supplier field from the Part model

And also:

  • Updated UI / API code

This means that we get better filtering for "primary" supplier parts, and more self-contained database tables

Important Note

The default_supplier field is not currently used for any business logic in the application

TODO

  • Unit tests for "primary" field
  • Playwright testing updates

@SchrodingersGat SchrodingersGat added this to the 1.3.0 milestone Feb 12, 2026
@SchrodingersGat SchrodingersGat added api Relates to the API breaking Indicates a major update or change which breaks compatibility refactor migration Data or schema migrations User Interface Related to the frontend / User Interface full-run Always do a full QC CI run labels Feb 12, 2026
@netlify

netlify Bot commented Feb 12, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 41125ec
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6997fcdb673e3e0009c3fc43
😎 Deploy Preview https://deploy-preview-11303--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 2 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.

@codecov

codecov Bot commented Feb 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.24528% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.98%. Comparing base (14d6d23) to head (41125ec).
⚠️ Report is 325 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11303      +/-   ##
==========================================
- Coverage   87.99%   87.98%   -0.01%     
==========================================
  Files        1292     1295       +3     
  Lines       58720    58755      +35     
  Branches     1943     1943              
==========================================
+ Hits        51668    51696      +28     
- Misses       6568     6575       +7     
  Partials      484      484              
Flag Coverage Δ
backend 89.17% <78.84%> (-0.01%) ⬇️
migrations 42.17% <48.07%> (-0.01%) ⬇️

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

Components Coverage Δ
Backend Apps 91.69% <78.43%> (-0.01%) ⬇️
Backend General 93.37% <ø> (ø)
Frontend 70.88% <100.00%> (+<0.01%) ⬆️
🚀 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.

LGTM

@codspeed

codspeed Bot commented Feb 16, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 22.72%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 37 improved benchmarks
✅ 7 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ WallTime test_api_list_performance[/api/part/] 77.1 ms 67.6 ms +13.98%
⚡ WallTime test_api_options_performance[/api/order/po/] 46.4 ms 42.1 ms +10.15%
⚡ WallTime test_search_performance[supplier] 14.5 ms 13.2 ms +10.1%
⚡ WallTime test_api_options_performance[/api/order/po-line/] 152.2 ms 130.3 ms +16.76%
⚡ WallTime test_api_list_performance[/api/stock/] 164.9 ms 138.9 ms +18.67%
⚡ WallTime test_search_performance[stockitem] 110.5 ms 92.6 ms +19.37%
⚡ WallTime test_search_performance[manufacturer] 14.4 ms 13.2 ms +8.96%
⚡ WallTime test_api_list_performance[/api/part/category/] 16.6 ms 15.1 ms +9.81%
⚡ WallTime test_search_performance[build] 36.4 ms 31.9 ms +14.1%
⚡ WallTime test_search_performance[purchaseorder] 24.5 ms 22.5 ms +9.09%
⚡ WallTime test_search_performance[stocklocation] 17.8 ms 16.3 ms +9.23%
⚡ WallTime test_search_performance[customer] 14.4 ms 13.2 ms +9.15%
⚡ WallTime test_search_performance[salesordershipment] 20.9 ms 18.6 ms +12.37%
⚡ WallTime test_search_performance[salesorder] 33.4 ms 29.6 ms +12.67%
⚡ WallTime test_api_list_performance[/api/stock/location/] 20.5 ms 18.1 ms +13.44%
⚡ WallTime test_search_performance[partcategory] 13.7 ms 12.6 ms +9.15%
⚡ WallTime test_api_list_performance[/api/company/] 18.9 ms 17.1 ms +10.18%
⚡ WallTime test_search_performance[supplierpart] 40.4 ms 36 ms +12.22%
⚡ WallTime test_api_list_performance[/api/build/] 44.4 ms 39.2 ms +13.21%
⚡ WallTime test_api_list_performance[/api/build/item/] 311.7 ms 254 ms +22.72%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing SchrodingersGat:default-supplier-part (41125ec) with master (14d6d23)

Open in CodSpeed

@SchrodingersGat
SchrodingersGat merged commit 3910cc5 into inventree:master Feb 20, 2026
36 of 37 checks passed
@SchrodingersGat
SchrodingersGat deleted the default-supplier-part branch February 25, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API breaking Indicates a major update or change which breaks compatibility full-run Always do a full QC CI run migration Data or schema migrations refactor User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants