logistics package
Subpackages
Submodules
logistics.admin module
logistics.apps module
logistics.models module
- class logistics.models.InventoryReceipt(id, receipt_id, receipt_date, received_quantity, received_condition, inspection_notes, inspection_report, order)[source]
Bases:
Model
- CONDITION_CHOICES = [('good', 'Good'), ('damaged', 'Damaged'), ('defective', 'Defective')]
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_next_by_receipt_date(*, field=<django.db.models.fields.DateField: receipt_date>, is_next=True, **kwargs)
- get_previous_by_receipt_date(*, field=<django.db.models.fields.DateField: receipt_date>, is_next=False, **kwargs)
- get_received_condition_display(*, field=<django.db.models.fields.CharField: received_condition>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- inspection_notes
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- inspection_report
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)
- objects = <django.db.models.manager.Manager object>
- order
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- order_id
- receipt_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- receipt_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- received_condition
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- received_quantity
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class logistics.models.Invoice(id, invoice_number, invoice_date, account_number, total_amount, payment_due_date, payment_mode, payment_status, invoice_report, vendor_rated, order)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- PAYMENT_MODE_CHOICES = [('credit', 'Credit'), ('debit', 'Debit'), ('cash', 'Cash'), ('cheque', 'Cheque')]
- PAYMENT_STATUS_CHOICES = [('paid', 'Paid'), ('pending', 'Pending')]
- account_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_invoice_date(*, field=<django.db.models.fields.DateField: invoice_date>, is_next=True, **kwargs)
- get_next_by_payment_due_date(*, field=<django.db.models.fields.DateField: payment_due_date>, is_next=True, **kwargs)
- get_payment_mode_display(*, field=<django.db.models.fields.CharField: payment_mode>)
- get_payment_status_display(*, field=<django.db.models.fields.CharField: payment_status>)
- get_previous_by_invoice_date(*, field=<django.db.models.fields.DateField: invoice_date>, is_next=False, **kwargs)
- get_previous_by_payment_due_date(*, field=<django.db.models.fields.DateField: payment_due_date>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- invoice_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- invoice_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- invoice_report
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)
- objects = <django.db.models.manager.Manager object>
- order
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- order_id
- payment_due_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- payment_mode
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- payment_status
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- total_amount
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- vendor_rated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
logistics.serializers module
- class logistics.serializers.InventoryReceiptSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
- class logistics.serializers.InvoicePaymentStatusSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
logistics.tasks module
logistics.tests module
- class logistics.tests.InventoryReceiptTests(methodName='runTest')[source]
Bases:
SetupClass
,TestCase
- class logistics.tests.InvoiceTests(methodName='runTest')[source]
Bases:
SetupClass
,TestCase
logistics.urls module
logistics.views module
- class logistics.views.BaseInventoryReceiptAPIView(**kwargs)[source]
Bases:
GenericAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
- serializer_class
alias of
InventoryReceiptSerializer
- class logistics.views.BaseInventoryReceiptVendorAPIView(**kwargs)[source]
Bases:
GenericAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
- serializer_class
alias of
InventoryReceiptSerializer
- class logistics.views.BaseInvoiceAPIView(**kwargs)[source]
Bases:
GenericAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
- serializer_class
alias of
InvoiceSerializer
- class logistics.views.BaseInvoiceProcurementOfficerAPIView(**kwargs)[source]
Bases:
GenericAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
- serializer_class
alias of
InvoiceSerializer
- class logistics.views.InventoryReceiptCreateView(**kwargs)[source]
Bases:
BaseInventoryReceiptAPIView
,CreateAPIView
- queryset = <QuerySet []>
- class logistics.views.InventoryReceiptDeleteView(**kwargs)[source]
Bases:
BaseInventoryReceiptAPIView
,DestroyAPIView
- queryset = <QuerySet []>
- class logistics.views.InventoryReceiptListView(**kwargs)[source]
Bases:
BaseInventoryReceiptAPIView
,ListAPIView
- class logistics.views.InventoryReceiptRetrieveView(**kwargs)[source]
Bases:
BaseInventoryReceiptAPIView
,RetrieveAPIView
- class logistics.views.InventoryReceiptUpdateView(**kwargs)[source]
Bases:
BaseInventoryReceiptAPIView
,UpdateAPIView
- queryset = <QuerySet []>
- class logistics.views.InventoryReceiptVendorListView(**kwargs)[source]
Bases:
BaseInventoryReceiptVendorAPIView
,ListAPIView
- class logistics.views.InventoryReceiptVendorRetrieveView(**kwargs)[source]
Bases:
BaseInventoryReceiptVendorAPIView
,RetrieveAPIView
- class logistics.views.InvoiceCreateView(**kwargs)[source]
Bases:
BaseInvoiceAPIView
,CreateAPIView
- queryset = <QuerySet []>
- class logistics.views.InvoiceDeleteView(**kwargs)[source]
Bases:
BaseInvoiceAPIView
,DestroyAPIView
- queryset = <QuerySet []>
- class logistics.views.InvoiceListView(**kwargs)[source]
Bases:
BaseInvoiceAPIView
,ListAPIView
- class logistics.views.InvoicePaymentStatusUpdateView(**kwargs)[source]
Bases:
UpdateAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
- serializer_class
alias of
InvoicePaymentStatusSerializer
- class logistics.views.InvoiceProcurementOfficerListView(**kwargs)[source]
Bases:
BaseInvoiceProcurementOfficerAPIView
,ListAPIView
- class logistics.views.InvoiceProcurementOfficerRetrieveView(**kwargs)[source]
Bases:
BaseInvoiceProcurementOfficerAPIView
,RetrieveAPIView
- class logistics.views.InvoiceRetrieveView(**kwargs)[source]
Bases:
BaseInvoiceAPIView
,RetrieveAPIView
- class logistics.views.InvoiceUpdateView(**kwargs)[source]
Bases:
BaseInvoiceAPIView
,UpdateAPIView
- queryset = <QuerySet []>
- class logistics.views.InvoiceVendorRatingUpdateView(**kwargs)[source]
Bases:
UpdateAPIView
- get_object()[source]
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()[source]
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
- serializer_class
alias of
InvoiceVendorRatingSerializer