rattail.ext.purchasing Module

This extension adds a more or less generic purchasing system to Rattail.

Core Mappings

In addition to providing extra classes (listed below), the purchasing extension also adds the following attribute to the core rattail.Product class:

sources

A list of rattail.ProductSource instances for the product.

Classes

class rattail.ProductSource(**kwargs)

Represents a source from which a product may be obtained via purchase.

product

A reference to the rattail.Product provided by this source.

vendor

A reference to the rattail.Vendor from which this source is available.

sku

A vendor-specific SKU to be used when ordering product via this source.

quantity

Quantity of the product which is represented by this source.

suggested_retail

The suggested retail price for the product, specific to this source.

unit_cost

The per-unit cost of the product when purchased via this source.

cost_recorded

Date and time when this source’s cost was last recorded. (For use in catalog data import tracking.)

cost_expires

Date and time when this source’s cost will expire, if known.

class rattail.PurchaseOrder(**kwargs)

Represents an actual purchase order.

id

An integer field which may contain a human-friendly ID for the purchase order.

vendor

A reference to the rattail.Vendor to whom this purchase order is submitted.

buyer

A reference to the rattail.Employee who is assembling the purchase order.

confirmer

A reference to the rattail.Employee who is confirming the purchase order.

ordered

Date and time when the order was submitted to the vendor.

expected

Date and time when the order is expected to arrive, if known.

received

Date and time when the order is received.

receiver

A reference to the rattail.Employee who receives the purchase order.

details

A list of rattail.PurchaseOrderProduct instances belonging to the purchase order.

class rattail.PurchaseOrderProduct(**kwargs)

Represents a line item within a purchase order.

product

A reference to the rattail.Product being ordered.

product_source

A reference to the specific rattail.ProductSource being ordered.

quantity_ordered

Quantity of the product being ordered. This value should be interpreted relative to PurchaseOrderProduct.product_source.

quantity_received

Quantity of the product which is received, for comparison to PurchaseOrderProduct.quantity_ordered.

class rattail.Vendor(**kwargs)

Represents a vendor from which products may be obtained via purchase.

name

The name of the vendor.

Table Of Contents

Previous topic

rattail.ext.orders Module

Next topic

rattail.ext.timeclock

This Page