Feature: Backend scaffolding for Repair Orders (#12064)#12072
Feature: Backend scaffolding for Repair Orders (#12064)#12072adityakrmishra wants to merge 31 commits into
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
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 91.44% 91.45%
=======================================
Files 976 977 +1
Lines 52162 52255 +93
=======================================
+ Hits 47701 47791 +90
- Misses 4461 4464 +3
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,
):…ixed Asset linking
|
The backend and frontend features are fully complete and passing all build/database tests. However, my local Windows pre-commit environment seems to be out of sync with the Ubuntu CI runner regarding a final prek formatting rule. Could a maintainer please trigger a format pass or apply the final linting patch on your end? |
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