Repository navigation
Pricing role - #13034
Merged
Merged
Pricing role#13034
Conversation
- migrate existing pricing models
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #13034 +/- ##
==========================================
+ Coverage 82.16% 87.11% +4.94%
==========================================
Files 1510 1533 +23
Lines 104281 106184 +1903
Branches 11541 11863 +322
==========================================
+ Hits 85682 92497 +6815
+ Misses 18537 13620 -4917
- Partials 62 67 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
SchrodingersGat
requested review from
matmair
and
a balanced review from Copilot
October 18, 2026 03:27
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Persisted-model migration and authorization changes need human review, with unresolved queue compatibility and nested permission issues.
2 open issues
What changed in this PR
Separates pricing from the parts app, laying the groundwork for future pricing features and independent permissions.
Changes:
- Moves pricing models, serializers, APIs, and admin views into a dedicated app.
- Adds a pricing role, permission migration, and frontend access controls.
- Adds legacy redirects, regression tests, and documentation.
| File | Description |
|---|---|
| tasks.py | Registers pricing in built-in app tasks. |
| src/frontend/src/pages/part/pricing/PricingOverviewPanel.tsx | Gates pricing actions. |
| src/frontend/src/pages/part/pricing/PriceBreakPanel.tsx | Uses pricing edit permissions. |
| src/frontend/src/pages/part/PartDetail.tsx | Gates the pricing tab. |
| src/frontend/lib/enums/Roles.tsx | Adds the pricing role. |
| src/frontend/lib/enums/ApiEndpoints.tsx | Updates pricing URLs. |
| src/backend/InvenTree/users/test_migrations.py | Tests role migration. |
| src/backend/InvenTree/users/ruleset.py | Maps pricing model permissions. |
| src/backend/InvenTree/users/oauth2_scopes.py | Adds pricing scopes. |
| src/backend/InvenTree/users/migrations/0019_pricing_role.py | Copies existing part permissions. |
| src/backend/InvenTree/pricing/test_pricing.py | Relocates pricing tests and tests depth logging. |
| src/backend/InvenTree/pricing/test_migrations.py | Tests data and content-type preservation. |
| src/backend/InvenTree/pricing/test_api.py | Tests permissions, validation, and redirects. |
| src/backend/InvenTree/pricing/serializers.py | Relocates serializers and strengthens override validation. |
| src/backend/InvenTree/pricing/models.py | Relocates pricing models and signals. |
| src/backend/InvenTree/pricing/migrations/0001_initial.py | Transfers model state and content types. |
| src/backend/InvenTree/pricing/migrations/__init__.py | Initializes migrations package. |
| src/backend/InvenTree/pricing/fixtures/part_pricebreaks.yaml | Updates fixture model labels. |
| src/backend/InvenTree/pricing/apps.py | Defines pricing app configuration. |
| src/backend/InvenTree/pricing/api.py | Provides dedicated pricing endpoints. |
| src/backend/InvenTree/pricing/admin.py | Relocates pricing admin views. |
| src/backend/InvenTree/pricing/__init__.py | Initializes pricing package. |
| src/backend/InvenTree/part/test_api.py | Updates pricing permission tests. |
| src/backend/InvenTree/part/tasks.py | Updates pricing model import. |
| src/backend/InvenTree/part/serializers.py | Adds pricing permission gates. |
| src/backend/InvenTree/part/models.py | Delegates pricing to the new app. |
| src/backend/InvenTree/part/migrations/0155_move_pricing_models.py | Removes old model state without dropping tables. |
| src/backend/InvenTree/part/apps.py | Updates startup pricing import. |
| src/backend/InvenTree/part/api.py | Redirects legacy pricing endpoints. |
| src/backend/InvenTree/part/admin.py | Removes relocated admin views. |
| src/backend/InvenTree/InvenTree/urls.py | Registers pricing routes. |
| src/backend/InvenTree/InvenTree/settings.py | Installs pricing app. |
| src/backend/InvenTree/InvenTree/api.py | Adds method-preserving redirects. |
| src/backend/InvenTree/InvenTree/api_version.py | Documents API changes. |
| docs/extract_schema.py | Adds pricing schema category. |
| docs/docs/settings/permissions.md | Links pricing permissions documentation. |
| docs/docs/part/pricing.md | Explains pricing role access. |
| docs/docs/api/schema/pricing.md | Adds pricing schema page. |
| docs/docs/api/schema.md | Links pricing schema. |
| .github/workflows/frontend.yaml | Selects pricing-compatible test data. |
Review effort: Balanced
matmair
reviewed
Oct 18, 2026
matmair
approved these changes
Oct 18, 2026
This was referenced Oct 20, 2026
SchrodingersGat
added a commit
to inventree/inventree-app
that referenced
this pull request
Oct 20, 2026
* Update pricing role checks Ref: inventree/InvenTree#13034 * Update release notes
matmair
approved these changes
Oct 20, 2026
Closed
carmelom
pushed a commit
to carmelom/inventree-python
that referenced
this pull request
Nov 10, 2026
- Support PartPricing summary model - Align with new API structure - Support legacy API structure too - Ref: inventree/InvenTree#13034
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Smaller target version of #12524
Laying the groundwork for further pricing changes.
Once this is merged, some of the actual functional changes / new features introduced in #12524 can be more cleanly implemented
Required Tasks