InvManage.serializers
Module Contents
Classes
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
- class InvManage.serializers.ShippingAddressSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
ShippingAddress
class instance.The
ShippingAddressSerializer.data
attribute gives theJSON
serialized data of theShippingAddress
instance:{ "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" }
- class InvManage.serializers.CommunicationSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
Communication
class instance.The
CommunicationSerializer.data
attribute gives theJSON
serialized data of theCommunication
instance:{ "email": "JohnDoe@domain.com", "phone": "(332) 654 6432" }
- class InvManage.serializers.ProductSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
Product
class instance.The
ProductSerializer.data
attribute gives theJSON
serialized data of theProduct
instance:{ "pk": 637, "name": "Piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }
- class Meta
- model
- fields = ['pk', 'name', 'category', 'quantity', 'identifier', 'location', 'description', 'prod_id']
- prod_id
- to_representation(self, instance)
- class InvManage.serializers.VendorSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
Vendor
class instance.The
VendorSerializer.data
attribute gives theJSON
serialized data of theVendor
instance:{ "name": "Harding Gross", "identifier": "HG", "gstin": "89ACC16843543", "address": { "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" }
- address
- to_representation(self, instance)
- class InvManage.serializers.ConsumerSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
Consumer
class instance.The
ConsumerSerializer.data
attribute gives theJSON
serialized data of theConsumer
instance:{ "name": "The Music Store", "identifier": "CONS1256", "gstin": "89AAC4633353643", "phone": "+91 8325642358", "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111", "email": "JohnDoe@themusic.store", "location": "Wokha" }
- class Meta
- model
- fields = ['name', 'identifier', 'gstin', 'phone', 'address', 'email', 'location']
- to_representation(self, instance)
- class InvManage.serializers.PPEntrySerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
ProductPurchaseEntry
class instance.The
PPEntrySerializer.data
attribute gives theJSON
serialized data of theProductPurchaseEntry
instance:{ "ppe_id": 324, "product": { "pk": 637, "name": "Piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "price": 10.0, "discount": 0.0, "order": 182, "pendingQty": 50 }
- class Meta
- model
- fields = ['ppe_id', 'product', 'quantity', 'price', 'discount', 'order', 'pendingQty']
- ppe_id
- product
- pendingQty
- to_representation(self, instance)
- create(self, validated_data)
- update(self, instance, validated_data)
- class InvManage.serializers.PurchaseOrderSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
PurchaseOrder
class instance.The
PurchaseOrderSerializer.data
attribute gives theJSON
serialized data of thePurchaseOrder
instance:{ "vendor": { "name": "Girish", "identifier": "GJ", "gstin": "GSTIN002", "address": { "name": "alsf", "address": "jas;k", "city": ";sdalkf", "phone": "alsf", "state": "kjdflk", "country": "ljflkj", "post": "54545" } }, "date": "25-Sep-2021", "po": 293, "subtotal": 279975.0, "taxtotal": 22398.0, "ordertotal": 302373.0, "ppes": [ { "ppe_id": 324, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "price": 10.0, "discount": 0.0, "order": 182, "pendingQty": 50 }, { "ppe_id": 325, "product": { "pk": 645, "name": "Tabl", "category": "Sociis Natoque Company", "quantity": 38276, "identifier": "PROD17", "location": "Schagen", "description": "aldgjlakjlkasdj", "prod_id": 645 }, "quantity": 250, "price": 90.0, "discount": 8.0, "order": 182, "pendingQty": 70 }, { "ppe_id": 326, "product": { "pk": 638, "name": "Goblet drum", "category": "Est Congue Consulting", "quantity": 46076, "identifier": "PROD10", "location": "Kaluga", "description": "aldgjlakjlkasdj", "prod_id": 638 }, "quantity": 200, "price": 150.0, "discount": 12.0, "order": 182, "pendingQty": 200 } ] }
- vendor
- ppes
- date
- to_representation(self, instance)
- class InvManage.serializers.GRNEntrySerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
GRNEntry
class instance.The
GRNEntrySerializer.data
attribute gives theJSON
serialized data of theGRNEntry
instance:{ "grn": 103, "grne_id": 117, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "receivedQty": 50, "acceptedQty": 50, "rejectedQty": 0, "remark": "OK" }
- class Meta
- model
- fields = ['grn', 'grne_id', 'product', 'quantity', 'receivedQty', 'acceptedQty', 'rejectedQty', 'remark']
- grne_id
- product
- grn
- to_representation(self, instance)
- create(self, validated_data)
- update(self, instance, validated_data)
- class InvManage.serializers.GRNEntryWithPORefSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
GRNEntry
class instance if the GRN references a purchase order.The
GRNEntryWithPORefSerializer.data
attribute gives theJSON
serialized data of theGRNEntry
instance:{ "grn": 103, "grne_id": 117, "ppe_id": 324, "po_id": 293, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "receivedQty": 50, "acceptedQty": 50, "rejectedQty": 0, "remark": "OK" }
- class Meta
- model
- fields = ['grn', 'grne_id', 'ppe_id', 'po_id', 'product', 'quantity', 'receivedQty', 'acceptedQty',...
- grne_id
- ppe_id
- po_id
- product
- grn
- to_representation(self, instance)
- create(self, validated_data)
- update(self, instance, validated_data)
- class InvManage.serializers.GoodsReceiptNoteSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
GoodsReceiptNote
class instance.The
GoodsReceiptNoteSerializer.data
attribute gives theJSON
serialized data of theGoodsReceiptNote
instance:{ "grnes": [ { "grn": 103, "grne_id": 117, "ppe_id": 324, "po_id": 293, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "receivedQty": 50, "acceptedQty": 50, "rejectedQty": 0, "remark": "OK" }, { "grn": 103, "grne_id": 118, "ppe_id": 325, "po_id": 293, "product": { "pk": 645, "name": "Tabl", "category": "Sociis Natoque Company", "quantity": 38276, "identifier": "PROD17", "location": "Schagen", "description": "aldgjlakjlkasdj", "prod_id": 645 }, "quantity": 250, "receivedQty": 200, "acceptedQty": 180, "rejectedQty": 20, "remark": "20 pieces faulty" } ], "date": "29-Sep-2021", "vendor": { "name": "Girish", "identifier": "GJ", "gstin": "GSTIN002", "address": { "name": "alsf", "address": "jas;k", "city": ";sdalkf", "phone": "alsf", "state": "kjdflk", "country": "ljflkj", "post": "54545" } }, "poRef": [ 182 ], "identifier": 846, "grnType": "auto", "amendDate": "2021-09-29T00:00:00Z", "transporter": "TeraTransport", "vehicleNumber": "GH-646358", "gateInwardNumber": "864353", "preparedBy": "KJL", "checkedBy": "KJH", "inspectedBy": "GIO", "approvedBy": "BHI" }
- class Meta
- model
- fields = ['grnes', 'date', 'vendor', 'poRef', 'identifier', 'grnType', 'amendDate', 'transporter',...
- grnes
- date
- vendor
- to_representation(self, instance)
- get_grnes(self, instance)
- class InvManage.serializers.PSEntrySerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
ProductSalesEntry
class instance.The
PSEntrySerializer.data
attribute gives theJSON
serialized data of theProductSalesEntry
instance:{ "pse_id": 64, "product": { "pk": 637, "name": "Piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 50, "price": 9900.0, "discount": 10.0, "order": 29 }
- pse_id
- product
- to_representation(self, instance)
- create(self, validated_data)
- update(self, instance, validated_data)
- class InvManage.serializers.SalesOrderSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
SalesOrder
class instance.The
SalesOrderSerializer.data
attribute gives theJSON
serialized data of theSalesOrder
instance:{ "consumer": { "name": "The Music Store", "identifier": "CONS1256", "gstin": "89AAC4633353643", "phone": "+91 8325642358", "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111", "email": "JohnDoe@themusic.store", "location": "Wokha" }, "date": "2021-09-25T00:00:00Z", "so": 89, "subtotal": 744900.0, "taxtotal": 59592.0, "ordertotal": 804492.0, "pses": [ { "pse_id": 64, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 50, "price": 9900.0, "discount": 10.0, "order": 29 }, { "pse_id": 65, "product": { "pk": 649, "name": "Sabar", "category": "Amet Consulting", "quantity": 3903, "identifier": "PROD21", "location": "Serang", "description": "High Sierra Sabar, Travel bag, Blue, Grey, Zipper, 36.5 L, 51.5 cm, 26 cm ", "prod_id": 649 }, "quantity": 25, "price": 4800.0, "discount": 8.0, "order": 29 }, { "pse_id": 66, "product": { "pk": 654, "name": "Parai", "category": "Aliquet Lobortis Ltd", "quantity": 8534, "identifier": "PROD26", "location": "Burhaniye", "description": "Kannan musical instruments Parai 15" inch (Baffallow skin) Daf Instrument", "prod_id": 654 }, "quantity": 35, "price": 6000.0, "discount": 10.0, "order": 29 } ] }
- class Meta
- model
- fields = ['consumer', 'date', 'so', 'subtotal', 'taxtotal', 'ordertotal', 'pses']
- consumer
- pses
- to_representation(self, instance)
- class InvManage.serializers.CompanySerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
Company
class instance.The
CompanySerializer.data
attribute gives theJSON
serialized data of theCompany
instance:{ "name": "Fringillami", "owner": "Ivor Barnett", "gstin": "89AAC056465468", "phone": "332 220-7026", "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium", "email": "est.tempor@fringillami.org", "location": "Belgium", "image": "/media/images/logo.png" }
- class InvManage.serializers.PurchaseInvoiceSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
PurchaseInvoice
class instance.The
PurchaseInvoiceSerializer.data
attribute gives theJSON
serialized data of thePurchaseInvoice
instance:{ "company": { "name": "Fringillami", "owner": "Ivor Barnett", "gstin": "89AAC056465468", "phone": "332 220-7026", "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium", "email": "est.tempor@fringillami.org", "location": "Belgium", "image": "/media/images/logo.png" }, "po": { "vendor": { "name": "Girish", "identifier": "GJ", "gstin": "GSTIN002", "address": { "name": "alsf", "address": "jas;k", "city": ";sdalkf", "phone": "alsf", "state": "kjdflk", "country": "ljflkj", "post": "54545" } }, "date": "25-Sep-2021", "po": 293, "subtotal": 279975.0, "taxtotal": 22398.0, "ordertotal": 302373.0, "ppes": [ { "ppe_id": 324, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "price": 10.0, "discount": 0.0, "order": 182, "pendingQty": 50 }, { "ppe_id": 325, "product": { "pk": 645, "name": "Tabl", "category": "Sociis Natoque Company", "quantity": 38276, "identifier": "PROD17", "location": "Schagen", "description": "aldgjlakjlkasdj", "prod_id": 645 }, "quantity": 250, "price": 90.0, "discount": 8.0, "order": 182, "pendingQty": 70 }, { "ppe_id": 326, "product": { "pk": 638, "name": "Goblet drum", "category": "Est Congue Consulting", "quantity": 46076, "identifier": "PROD10", "location": "Kaluga", "description": "aldgjlakjlkasdj", "prod_id": 638 }, "quantity": 200, "price": 150.0, "discount": 12.0, "order": 182, "pendingQty": 200 }, { "ppe_id": 327, "product": { "pk": 643, "name": "quinto", "category": "Enim Suspendisse Associates", "quantity": 51099, "identifier": "PROD15", "location": "Nagpur", "description": "aldgjlakjlkasdj", "prod_id": 643 }, "quantity": 350, "price": 150.0, "discount": 10.0, "order": 182, "pendingQty": 350 }, { "ppe_id": 328, "product": { "pk": 651, "name": "Igihumurizo", "category": "Curabitur Massa Vestibulum Consulting", "quantity": 48553, "identifier": "PROD23", "location": "Yeovil", "description": "aldgjlakjlkasdj", "prod_id": 651 }, "quantity": 500, "price": 50.0, "discount": 6.0, "order": 182, "pendingQty": 500 }, { "ppe_id": 329, "product": { "pk": 653, "name": "Balsié", "category": "Eu Foundation", "quantity": 29988, "identifier": "PROD25", "location": "Sudbury", "description": "aldgjlakjlkasdj", "prod_id": 653 }, "quantity": 200, "price": 500.0, "discount": 15.0, "order": 182, "pendingQty": 200 }, { "ppe_id": 330, "product": { "pk": 656, "name": "Padayani thappu", "category": "Posuere LLP", "quantity": 6358, "identifier": "PROD28", "location": "Ruvo del Monte", "description": "aldgjlakjlkasdj", "prod_id": 656 }, "quantity": 350, "price": 250.0, "discount": 13.0, "order": 182, "pendingQty": 350 } ] }, "shippingaddress": { "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" }, "communication": { "email": "asfs@aflk.com", "phone": "6546432" } }
- company
- po
- shippingaddress
- communication
- class InvManage.serializers.GRNInvoiceSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
GRNInvoice
class instance.The
GRNInvoiceSerializer.data
attribute gives theJSON
serialized data of theGRNInvoice
instance:{ "company": { "name": "Fringillami", "owner": "Ivor Barnett", "gstin": "89AAC056465468", "phone": "332 220-7026", "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium", "email": "est.tempor@fringillami.org", "location": "Belgium", "image": "/media/images/logo.png" }, "grn": { "grnes": [ { "grn": 103, "grne_id": 117, "ppe_id": 324, "po_id": 293, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 100, "receivedQty": 50, "acceptedQty": 50, "rejectedQty": 0, "remark": "OK" }, { "grn": 103, "grne_id": 118, "ppe_id": 325, "po_id": 293, "product": { "pk": 645, "name": "Tabl", "category": "Sociis Natoque Company", "quantity": 38276, "identifier": "PROD17", "location": "Schagen", "description": "aldgjlakjlkasdj", "prod_id": 645 }, "quantity": 250, "receivedQty": 200, "acceptedQty": 180, "rejectedQty": 20, "remark": "20 pieces faulty" } ], "date": "29-Sep-2021", "vendor": { "name": "Girish", "identifier": "GJ", "gstin": "GSTIN002", "address": { "name": "alsf", "address": "jas;k", "city": ";sdalkf", "phone": "alsf", "state": "kjdflk", "country": "ljflkj", "post": "54545" } }, "poRef": [ 182 ], "identifier": 846, "grnType": "auto", "amendDate": "2021-09-29T00:00:00Z", "transporter": "TeraTransport", "vehicleNumber": "GH-646358", "gateInwardNumber": "864353", "preparedBy": "KJL", "checkedBy": "KJH", "inspectedBy": "GIO", "approvedBy": "BHI" }, "shippingaddress": { "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" }, "communication": { "email": "asfs@aflk.com", "phone": "6546432" } }
- company
- grn
- shippingaddress
- communication
- class InvManage.serializers.SalesInvoiceSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
SalesInvoice
class instance.The
SalesInvoiceSerializer.data
attribute gives theJSON
serialized data of theSalesInvoice
instance:{ "company": { "name": "Fringillami", "owner": "Ivor Barnett", "gstin": "89AAC056465468", "phone": "332 220-7026", "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium", "email": "est.tempor@fringillami.org", "location": "Belgium", "image": "/media/images/hyperlink-green_x91WW5n.png" }, "so": { "consumer": { "name": "The Music Store", "identifier": "CONS1256", "gstin": "89AAC4633353643", "phone": "+91 8325642358", "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111", "email": "JohnDoe@themusic.store", "location": "Wokha" }, "date": "2021-09-25T00:00:00Z", "so": 89, "subtotal": 744900.0, "taxtotal": 59592.0, "ordertotal": 804492.0, "pses": [ { "pse_id": 64, "product": { "pk": 637, "name": "piano", "category": "Ultricies PC", "quantity": 23921, "identifier": "PROD9", "location": "Musselburgh", "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ", "prod_id": 637 }, "quantity": 50, "price": 9900.0, "discount": 10.0, "order": 29 }, { "pse_id": 65, "product": { "pk": 649, "name": "Sabar", "category": "Amet Consulting", "quantity": 3903, "identifier": "PROD21", "location": "Serang", "description": "High Sierra Sabar, Travel bag, Blue, Grey, Zipper, 36.5 L, 51.5 cm, 26 cm ", "prod_id": 649 }, "quantity": 25, "price": 4800.0, "discount": 8.0, "order": 29 }, { "pse_id": 66, "product": { "pk": 654, "name": "Parai", "category": "Aliquet Lobortis Ltd", "quantity": 8534, "identifier": "PROD26", "location": "Burhaniye", "description": "Kannan musical instruments Parai 15" inch (Baffallow skin) Daf Instrument", "prod_id": 654 }, "quantity": 35, "price": 6000.0, "discount": 10.0, "order": 29 } ] }, "shippingaddress": { "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" } }
- company
- so
- shippingaddress
- class InvManage.serializers.EventTypeSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
EventType
class instance.The
EventTypeSerializer.data
attribute gives theJSON
serialized data of theEventType
instance:{ "name": "# 85", "label": "Purchase Order" }
- class InvManage.serializers.ObjectModelSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
ObjectModel
class instance.The
ObjectModelSerializer.data
attribute gives theJSON
serialized data of theObjectModel
instance:{ "name": "# 85", "label": "Purchase Order", "modName": "PurchaseOrder" }
- class InvManage.serializers.HistoryFilterStateSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
HistoryFilterState
class instance.The
HistoryFilterStateSerializer.data
attribute gives theJSON
serialized data of theHistoryFilterState
instance:{ "name": PreRelease20x, "numEntries" : 10, "eventTypes": { "Created", "Updated", "Deleted" }, "objModels": { "Company", "Vendor", "PurchaseOrder", "Product", "Consumer", "SalesOrder", "GoodsReceiptNote" } }
- events
- objModels
- update(self, instance, validated_data)