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
commit 309097293f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 8 deletions

File diff suppressed because one or more lines are too long

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):
"""

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):
"""

View File

@ -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}/`;

View File

@ -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' %}">

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' %}">

View File

@ -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' %}">

View File

@ -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' %}">

View File

@ -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' %}">

View File

@ -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' %}">