mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Refactoring / Enhancements (#8307)
* Create simply PartSalesPanel component * Updates * Add API endpoint for SalesHistory - And serializers - Basic, needs lots of work still * Fix for PartDetail page * SalesOrder page updates * More page updates * Update API endpoint * Backend improvements * add API endpoint * Front-end rendering * Make frontend generic * Fix for CompanyTable * Make back-end API more generic * More API improvements * Implement history for purchasing * API / UI fixes * Remove debug statements * Support file download * Add endpoint for build order history * Implement UI for build order history * Revert backend * Revert frontend * Remove unsed imports * Cleanup permission checks * Bump API version * Improve token management code - Do not request token if other cookies are unavailable - Do not fetch user data if token is unavailable - Prevents connection error logs * Fix for CompanyTable - onRowClick
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
"""InvenTree API version information."""
|
||||
|
||||
# InvenTree API version
|
||||
INVENTREE_API_VERSION = 269
|
||||
INVENTREE_API_VERSION = 270
|
||||
|
||||
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
|
||||
|
||||
|
||||
INVENTREE_API_TEXT = """
|
||||
|
||||
v270 - 2024-10-19 : https://github.com/inventree/InvenTree/pull/8307
|
||||
- Adds missing date fields from order API endpoint(s)
|
||||
|
||||
v269 - 2024-10-16 : https://github.com/inventree/InvenTree/pull/8295
|
||||
- Adds "include_variants" filter to the BuildOrder API endpoint
|
||||
- Adds "include_variants" filter to the SalesOrder API endpoint
|
||||
|
@ -6,9 +6,8 @@ from django.urls import include, path
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from rest_framework.exceptions import ValidationError
|
||||
|
||||
from django_filters import rest_framework as rest_filters
|
||||
from rest_framework.exceptions import ValidationError
|
||||
|
||||
from importer.mixins import DataExportViewMixin
|
||||
|
||||
@ -149,7 +148,7 @@ class BuildFilter(rest_filters.FilterSet):
|
||||
def filter_responsible(self, queryset, name, owner):
|
||||
"""Filter by orders which are assigned to the specified owner."""
|
||||
|
||||
owners = list(Owner.objects.filter(pk=value))
|
||||
owners = list(Owner.objects.filter(pk=owner))
|
||||
|
||||
# if we query by a user, also find all ownerships through group memberships
|
||||
if len(owners) > 0 and owners[0].label() == 'user':
|
||||
|
@ -23,3 +23,7 @@ class BuildStatusGroups:
|
||||
BuildStatus.ON_HOLD.value,
|
||||
BuildStatus.PRODUCTION.value,
|
||||
]
|
||||
|
||||
COMPLETE = [
|
||||
BuildStatus.COMPLETE.value,
|
||||
]
|
||||
|
@ -1773,6 +1773,8 @@ class ReturnOrderSerializer(
|
||||
model = order.models.ReturnOrder
|
||||
|
||||
fields = AbstractOrderSerializer.order_fields([
|
||||
'issue_date',
|
||||
'complete_date',
|
||||
'customer',
|
||||
'customer_detail',
|
||||
'customer_reference',
|
||||
|
@ -35,6 +35,8 @@ class PurchaseOrderStatusGroups:
|
||||
PurchaseOrderStatus.RETURNED.value,
|
||||
]
|
||||
|
||||
COMPLETE = [PurchaseOrderStatus.COMPLETE.value]
|
||||
|
||||
|
||||
class SalesOrderStatus(StatusCode):
|
||||
"""Defines a set of status codes for a SalesOrder."""
|
||||
@ -91,6 +93,8 @@ class ReturnOrderStatusGroups:
|
||||
ReturnOrderStatus.IN_PROGRESS.value,
|
||||
]
|
||||
|
||||
COMPLETE = [ReturnOrderStatus.COMPLETE.value]
|
||||
|
||||
|
||||
class ReturnOrderLineStatus(StatusCode):
|
||||
"""Defines a set of status codes for a ReturnOrderLineItem."""
|
||||
|
Reference in New Issue
Block a user