Changeset - 7925b3b43265
[Not reviewed]
0 3 3
Lance Edgar (lance) - 3 years ago 2022-01-13 15:44:24
lance@edbob.org
Add basic docs for existing label features
6 files changed with 51 insertions and 7 deletions:
0 comments (0 inline, 0 general)
docs/api/index.rst
Show inline comments
 
@@ -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
docs/api/rattail/batch/labels.rst
Show inline comments
 
new file 100644
 

	
 
``rattail.batch.labels``
 
========================
 

	
 
.. automodule:: rattail.batch.labels
 
   :members:
docs/api/rattail/db/index.rst
Show inline comments
 
@@ -27,6 +27,7 @@
 
   model.batch.purchase
 
   model.batch.vendorcatalog
 
   model.datasync
 
   model.labels
 
   model.people
 
   model.products
 
   model.purchase
docs/api/rattail/db/model.labels.rst
Show inline comments
 
new file 100644
 

	
 
``rattail.db.model.labels``
 
===========================
 

	
 
.. automodule:: rattail.db.model.labels
 
  :members:
docs/api/rattail/labels.rst
Show inline comments
 
new file 100644
 

	
 
``rattail.labels``
 
==================
 

	
 
.. automodule:: rattail.labels
 
   :members:
rattail/db/model/labels.py
Show inline comments
 
@@ -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"
0 comments (0 inline, 0 general)