Skip to content

refactor PurchaseOrder APIs to viewset - #12317

Merged
SchrodingersGat merged 23 commits into
inventree:masterfrom
matmair:refactor-to-drf-viewset
Aug 20, 2026
Merged

SchrodingersGat merged 23 commits into
inventree:masterfrom
matmair:refactor-to-drf-viewset

Conversation

@matmair

@matmair matmair commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

This is the first major functional refactor of a complex API tree to modelviewsets; In the long run it would make sense to generally switch to this pattern in most places:

  • it requires less knowledge of api endpoint naming and building practices
  • it is even more DRY
  • if used in plugins we can move to more "kitchensink" generic modelviewsets that detect usage of features and append the correct api paths (where necessary; we are slowly moving to generic endpoints for things like attachments, notes, images anyway)

@netlify

netlify Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 0561f9b
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a86967d410a0f00084e629f
😎 Deploy Preview https://deploy-preview-12317--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: 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
🤖 Make changes Run an agent on this branch

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

@matmair matmair changed the title refactor PurchaseOrder APIs to viewser refactor PurchaseOrder APIs to viewset Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.79%. Comparing base (36d21fe) to head (0561f9b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12317      +/-   ##
==========================================
- Coverage   86.80%   86.79%   -0.01%     
==========================================
  Files        1454     1454              
  Lines       97351    97389      +38     
  Branches    11319    11380      +61     
==========================================
+ Hits        84502    84528      +26     
- Misses      12783    12795      +12     
  Partials       66       66              
Flag Coverage Δ
backend 90.85% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 92.23% <100.00%> (+<0.01%) ⬆️
Backend General 93.74% <ø> (ø)
Frontend 79.66% <ø> (-0.04%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matmair matmair added this to the 1.6.0 milestone Aug 18, 2026
@matmair matmair added the api Relates to the API label Aug 18, 2026
Comment thread src/backend/InvenTree/InvenTree/api.py Resolved
Comment thread src/backend/InvenTree/order/api.py Resolved
Comment thread src/backend/InvenTree/order/api.py Resolved
@matmair
matmair marked this pull request as ready for review August 19, 2026 19:42
@matmair matmair mentioned this pull request Aug 19, 2026
@matmair

matmair commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

@SchrodingersGat ready for merge

@SchrodingersGat
SchrodingersGat merged commit a48ba58 into inventree:master Aug 20, 2026
42 checks passed
@SchrodingersGat
SchrodingersGat deleted the refactor-to-drf-viewset branch August 20, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants