2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-01 23:34:41 +00:00

Merge pull request #1768 from SchrodingersGat/attachment-fixes

Fixes for attachment issues
This commit is contained in:
Oliver
2021-07-08 11:12:34 +10:00
committed by GitHub
10 changed files with 29 additions and 8 deletions
File diff suppressed because one or more lines are too long
+8
View File
@@ -237,6 +237,14 @@ class BuildAttachmentList(generics.ListCreateAPIView, AttachmentMixin):
queryset = BuildOrderAttachment.objects.all()
serializer_class = BuildAttachmentSerializer
filter_backends = [
DjangoFilterBackend,
]
filter_fields = [
'build',
]
class BuildAttachmentDetail(generics.RetrieveUpdateDestroyAPIView, AttachmentMixin):
"""
+12
View File
@@ -271,6 +271,10 @@ class SOAttachmentList(generics.ListCreateAPIView, AttachmentMixin):
queryset = SalesOrderAttachment.objects.all()
serializer_class = SOAttachmentSerializer
filter_backends = [
DjangoFilterBackend,
]
filter_fields = [
'order',
]
@@ -593,6 +597,14 @@ class POAttachmentList(generics.ListCreateAPIView, AttachmentMixin):
queryset = PurchaseOrderAttachment.objects.all()
serializer_class = POAttachmentSerializer
filter_backends = [
DjangoFilterBackend,
]
filter_fields = [
'order',
]
class POAttachmentDetail(generics.RetrieveUpdateDestroyAPIView, AttachmentMixin):
"""
@@ -37,7 +37,7 @@ loadAttachmentTable(
'{% url "api-stock-attachment-list" %}',
{
filters: {
item: {{ item.pk }},
stock_item: {{ item.pk }},
},
onEdit: function(pk) {
var url = `/api/stock/attachment/${pk}/`;
@@ -13,8 +13,8 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
+1 -1
View File
@@ -12,7 +12,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
@@ -13,7 +13,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
@@ -13,7 +13,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
@@ -13,7 +13,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
@@ -13,7 +13,7 @@
<!-- CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/select2.css' %}">
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">