diff --git a/InvenTree/build/serializers.py b/InvenTree/build/serializers.py index 06c4f36ebb..e33fcb6c7f 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -159,5 +159,10 @@ class BuildAttachmentSerializer(InvenTreeModelSerializer): 'pk', 'build', 'attachment', - 'comment' + 'comment', + 'upload_date', + ] + + read_only_fields = [ + 'upload_date', ] diff --git a/InvenTree/order/serializers.py b/InvenTree/order/serializers.py index e527b3cec9..f1eac82530 100644 --- a/InvenTree/order/serializers.py +++ b/InvenTree/order/serializers.py @@ -157,6 +157,11 @@ class POAttachmentSerializer(InvenTreeModelSerializer): 'order', 'attachment', 'comment', + 'upload_date', + ] + + read_only_fields = [ + 'upload_date', ] @@ -359,4 +364,9 @@ class SOAttachmentSerializer(InvenTreeModelSerializer): 'order', 'attachment', 'comment', + 'upload_date', + ] + + read_only_fields = [ + 'upload_date', ] diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index fb5480f668..b8b9b92d5e 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -61,7 +61,12 @@ class PartAttachmentSerializer(InvenTreeModelSerializer): 'pk', 'part', 'attachment', - 'comment' + 'comment', + 'upload_date', + ] + + read_only_fields = [ + 'upload_date', ] diff --git a/InvenTree/stock/serializers.py b/InvenTree/stock/serializers.py index 38301bdd1f..c4ac404591 100644 --- a/InvenTree/stock/serializers.py +++ b/InvenTree/stock/serializers.py @@ -270,6 +270,11 @@ class LocationSerializer(InvenTreeModelSerializer): 'parent', 'pathstring', 'items', + 'upload_date', + ] + + read_only_fields = [ + 'upload_date', ] diff --git a/InvenTree/templates/js/attachment.js b/InvenTree/templates/js/attachment.js index 4fce7e06fe..4b9d522a59 100644 --- a/InvenTree/templates/js/attachment.js +++ b/InvenTree/templates/js/attachment.js @@ -51,6 +51,10 @@ function loadAttachmentTable(url, options) { field: 'comment', title: '{% trans "Comment" %}', }, + { + field: 'upload_date', + title: '{% trans "Upload Date" %}', + }, { field: 'actions', formatter: function(value, row) {