Feature: Backend scaffolding for Repair Orders (#12064) - #12072
Feature: Backend scaffolding for Repair Orders (#12064)#12072adityakrmishra wants to merge 115 commits into
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code FormattingAs a starting point it looks like your linting is different to our standard. As per our contributing guide - run this command on your local instance: invoke dev.setup-devThis will ensure that any commits will be correctly formatted automatically. Migration FilesYou will need to commit any migration files when changing database models. Run |
| class RepairOrderList(ListCreateAPI): | ||
| """API endpoint for accessing a list of RepairOrder objects.""" | ||
|
|
||
| queryset = models.RepairOrder.objects.all() | ||
| serializer_class = serializers.RepairOrderSerializer |
There was a problem hiding this comment.
I am missing a permissions class here
…ff --preview formatting
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #12072 +/- ##
==========================================
+ Coverage 87.09% 87.18% +0.08%
==========================================
Files 1483 1484 +1
Lines 100509 101427 +918
Branches 11527 11525 -2
==========================================
+ Hits 87542 88428 +886
- Misses 12904 12936 +32
Partials 63 63
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…yml to fix SonarCloud
| class RepairOrder( | ||
| InvenTree.models.InvenTreeAttachmentMixin, | ||
| InvenTree.models.InvenTreeNotesMixin, | ||
| InvenTree.models.InvenTreeMetadataModel, |
There was a problem hiding this comment.
You will need to add a number of other mixin classes here - look at the "BuildOrder" model for reference:
class Build(
InvenTree.models.PluginValidationMixin,
report.mixins.InvenTreeReportMixin,
InvenTree.models.InvenTreeParameterMixin,
InvenTree.models.InvenTreeAttachmentMixin,
InvenTree.models.InvenTreeBarcodeMixin,
InvenTree.models.InvenTreeNotesMixin,
InvenTree.models.ReferenceIndexingMixin,
StateTransitionMixin,
StatusCodeMixin,
InvenTree.models.MetadataMixin,
InvenTree.models.InvenTreeTree,
):There was a problem hiding this comment.
Please review and make requested changes
- Resolved api_version.py: bumped to v538, integrated Notes refactor (v537) and SCIM (v536) entries - Resolved report/tests.py: combined RepairOrder and Note imports - Fixed RepairOrderSerializer: removed deprecated NotesFieldMixin (removed by upstream Notes refactor PR inventree#11971)
- Remove deprecated NotesFieldMixin from RepairOrderSerializer (removed by upstream Notes refactor PR inventree#11971) - Update pui_repair.spec.ts: navigate to manufacturing/index/repairorders (table moved from sales) - Update pui_repair.spec.ts: fill required part field during RepairOrder creation
…yakrmishra/InvenTree into feature-repair-orders-backend-12064
Test Verification ResultsI've verified the Repair Order feature locally with Python 3.12.14 and all tests pass: Test Results
Fixes Applied
Environment Requirements
The implementation is solid and ready for merge. All tests pass locally with the fixes above. |
…repair-orders-backend-12064
…yakrmishra/InvenTree into feature-repair-orders-backend-12064
… setting for E2E tests
…yakrmishra/InvenTree into feature-repair-orders-backend-12064
…repair-orders-backend-12064

Addresses the backend requirements for #12064.
This PR introduces the initial Django architecture for the new Repair Order feature, integrating it into the
orderapp as discussed.Additions:
RepairOrderStatusenumerations.RepairOrder,RepairOrderLineItem, andRepairOrderAllocationtoorder/models.py.order/api.py.ruff.(Note: Migration files have not been generated in this commit to avoid environment conflicts. Please run
manage.py makemigrations orderwhen reviewing.)Ready for review before we move on to the Mantine UI scaffolding!
closes #12064