Add basic docs for existing label features

This commit is contained in:
Lance Edgar 2022-01-13 15:44:24 -06:00
parent 26e7d55e67
commit 7925b3b432
6 changed files with 51 additions and 7 deletions

View file

@ -17,6 +17,7 @@ attributes and method signatures etc.
rattail/batch/custorder
rattail/batch/handheld
rattail/batch/handlers
rattail/batch/labels
rattail/batch/pricing
rattail/batch/product
rattail/batch/purchase
@ -54,6 +55,7 @@ attributes and method signatures etc.
rattail/importing/sqlalchemy
rattail/reporting/index
rattail/reporting/handlers
rattail/labels
rattail/logging
rattail/mail
rattail/membership

View file

@ -0,0 +1,6 @@
``rattail.batch.labels``
========================
.. automodule:: rattail.batch.labels
:members:

View file

@ -27,6 +27,7 @@
model.batch.purchase
model.batch.vendorcatalog
model.datasync
model.labels
model.people
model.products
model.purchase

View file

@ -0,0 +1,6 @@
``rattail.db.model.labels``
===========================
.. automodule:: rattail.db.model.labels
:members:

View file

@ -0,0 +1,6 @@
``rattail.labels``
==================
.. automodule:: rattail.labels
:members:

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2018 Lance Edgar
# Copyright © 2010-2022 Lance Edgar
#
# This file is part of Rattail.
#
@ -43,18 +43,41 @@ class LabelProfile(Base):
__versioned__ = {}
uuid = uuid_column()
ordinal = sa.Column(sa.Integer())
ordinal = sa.Column(sa.Integer(), nullable=True, doc="""
Preference ordinal number for the profile. Profiles are typically
sorted by this number, which means the lower the number the higher
the preference.
""")
code = sa.Column(sa.String(length=30), nullable=True, doc="""
Supposedly unique "code" for the label profile. May be useful for
identification of a common label type across nodes, for instance.
""")
description = sa.Column(sa.String(length=50))
printer_spec = sa.Column(sa.String(length=255))
formatter_spec = sa.Column(sa.String(length=255))
format = sa.Column(sa.Text())
visible = sa.Column(sa.Boolean())
description = sa.Column(sa.String(length=50), nullable=True, doc="""
Description for the profile, to be displayed to the user.
""")
printer_spec = sa.Column(sa.String(length=255), nullable=True, doc="""
Factory spec for the label printer. This normally references some
subclass of :class:`rattail.labels.LabelPrinter`.
""")
formatter_spec = sa.Column(sa.String(length=255), nullable=True, doc="""
Factory spec for the label formatter. This normally references some
subclass of :class:`rattail.labels.LabelFormatter`.
""")
format = sa.Column(sa.Text(), nullable=True, doc="""
Format template used to generate label commands. Syntax for this
may depend on the type of printer you have.
""")
# TODO: this should have default=True, or something?
visible = sa.Column(sa.Boolean(), nullable=True, doc="""
Visibility flag; set this to false to hide the profile from users.
""")
sync_me = sa.Column(sa.Boolean(), nullable=True, doc="""
Flag indicating whether this label profile should be synced across "all"