rattail.ext.orders Module

This extension adds a more or less generic customer (special) order system to Rattail.

The API itself is meant to allow for many different workflows, so how you use it really should be up to you. Please see http://rattail.edbob.org/moin/Workflows/Orders for some notes on workflow.

Classes

class rattail.Order(**kwargs)

Represents an order submitted by a customer.

id

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

This is auto-incremented by default.

customer

A reference to a rattail.Customer to which the order belongs.

products

A list of rattail.OrderProduct instances which belong to the order.

created

Date and time the order was created.

creator

A reference to the rattail.User who created the order.

status

An integer field to contain a custom-defined enumeration value.

events

A list of rattail.OrderEvent instances for the order.

class rattail.OrderEvent(**kwargs)

Represents an event within the workflow of a rattail.Order.

order

A reference to the rattail.Order to which the event applies.

type

An integer field to contain a custom-defined enumeration value.

timestamp

Date and time when the event occurred.

user

A reference to the rattail.User who performed the event.

note

Optional note text for the event.

class rattail.OrderProduct(**kwargs)

Represents a product (line item) within a rattail.Order.

id

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

This is auto-incremented by default.

order

A reference to the rattail.Order to which the item belongs.

ordinal

An integer containing the “line number” within the Order.

product

Reference to the rattail.Product being ordered.

product_description

A cached copy of the OrderProduct.product‘s description.

initial_description

A large text field to contain a free-form description of the product and its attributes, for use when the product cannot be solidly identified when the order is created.

quantity

Decimal quantity for the product being ordered.

price

A reference to the rattail.Price to be charged for the product.

discount_percent

Percentage discount to be applied to the product at the point of sale.

discount_amount

Dollar amount of discount to be applied to the product at the point of sale.

deposit_due

Dollar amount of the total deposit which is required for the product.

deposit_paid

Dollar amount of any deposit(s) which has been paid.

total_due

Total payment amount which is required for the product.

total_paid

Dollar amount of any payment(s) which has been submitted.

status

An integer field to contain a custom-defined enumeration value.

events

A list of rattail.OrderProductEvent instances for the item.

class rattail.OrderProductEvent(**kwargs)

Represents an event within the workflow of a rattail.OrderProduct.

order_product

A reference to the rattail.OrderProduct to which the event applies.

type

An integer field to contain a custom-defined enumeration value.

timestamp

Date and time when the event occurred.

user

A reference to the rattail.User who performed the event.

note

Optional note text for the event.

Enumeration: Order Status

This enumeration is meant to hold possible values for Order.status.

ORDER_STATUS

Dictionary containing text mappings for the enumeration.

OS_INITIATED

The first status an Order may have.

Enumeration: Order Product Status

This enumeration is meant to hold possible values for OrderProduct.status.

ORDER_PRODUCT_STATUS

Dictionary containing text mappings for the enumeration.

OPS_INITIATED

The first status an OrderProduct may have.

Table Of Contents

Previous topic

rattail.ext.members Module

Next topic

rattail.ext.purchasing Module

This Page