mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
41 lines
881 B
Python
41 lines
881 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from InvenTree.serializers import InvenTreeModelSerializer
|
|
from InvenTree.serializers import InvenTreeAttachmentSerializerField
|
|
|
|
from .models import TestReport
|
|
from .models import BillOfMaterialsReport
|
|
|
|
|
|
class TestReportSerializer(InvenTreeModelSerializer):
|
|
|
|
template = InvenTreeAttachmentSerializerField(required=True)
|
|
|
|
class Meta:
|
|
model = TestReport
|
|
fields = [
|
|
'pk',
|
|
'name',
|
|
'description',
|
|
'template',
|
|
'filters',
|
|
'enabled',
|
|
]
|
|
|
|
|
|
class BOMReportSerializer(InvenTreeModelSerializer):
|
|
|
|
template = InvenTreeAttachmentSerializerField(required=True)
|
|
|
|
class Meta:
|
|
model = BillOfMaterialsReport
|
|
fields = [
|
|
'pk',
|
|
'name',
|
|
'description',
|
|
'template',
|
|
'filters',
|
|
'enabled',
|
|
]
|