rattail.db.model.org

Data Models for Organization etc.

class rattail.db.model.org.Category(**kwargs)[source]

Represents an organizational category for products.

code

Unique code for the category, as string.

department

Reference to the Department to which this category belongs, if applicable.

name

Descriptive name for the category.

number

Number for the category. NOTE: Most code leverages the code instead of this number, which is essentially ignored.

class rattail.db.model.org.Department(**kwargs)[source]

Represents an organizational department.

allow_product_deletions

Whether products belonging to this department may be deleted.

default_custorder_discount

Default item discount for customer orders, if applicable.

exempt_from_gross_sales

Flag indicating whether items in this department should (not) contribute to gross sales figures. The SIL book says this about it:

Dollar sales are not to be included in gross sales. (i.e., Postage Stamps, Lottery Tickets, etc.).

food_stampable

Flag indicating whether food stamps are a valid form of payment for the department, if applicable.

name

Name for the department.

number

Presumably unique number for the department, as integer.

personnel

Flag indicating whether the department may be used for personnel organization, irrespective of its product flag.

product

Flag indicating whether the department may be used for product organization, irrespective of its personnel flag.

tax

Reference to the tax which should “typically” be incurred for sales to this department, if applicable.

Represents a bottle or similar deposit, to which an item may be linked.

code

Unique “code” for the deposit link.

class rattail.db.model.org.Family(**kwargs)[source]

Represents an organizational family for products.

code

Unique integer code for the family, if applicable.

name

Unique name for the family.

products

List of Product objects which belong to this family.

class rattail.db.model.org.ReportCode(**kwargs)[source]

Represents an organizational “report code” for products.

products

List of Product objects which associate with this report code.

class rattail.db.model.org.Subdepartment(**kwargs)[source]

Represents an organizational subdepartment.