rattail.db.model.labels

Data Models for Label Printing

class rattail.db.model.labels.LabelProfile(**kwargs)[source]

Represents a collection of settings for product label printing.

code

Supposedly unique “code” for the label profile. May be useful for identification of a common label type across nodes, for instance.

description

Description for the profile, to be displayed to the user.

format

Formatting template. This is a string containing a template of raw printer commands, suitable for printing a single label record.

This value is assigned to the label formatter, which uses it to render the final command string when printing occurs. For more info see rattail.labels.CommandFormatter.template.

formatter_spec

Factory spec for the label formatter. This normally references some subclass of rattail.labels.LabelFormatter.

ordinal

Preference ordinal number for the profile. Profiles are typically sorted by this number, which means the lower the number the higher the preference.

printer_spec

Factory spec for the label printer. This normally references some subclass of rattail.labels.LabelPrinter.

sync_me

Flag indicating whether this label profile should be synced across “all” other Rattail systems across the organization.

visible

Visibility flag; set this to false to hide the profile from users.