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
 
@@ -14,12 +14,13 @@ attributes and method signatures etc.
 
   rattail/auth
 
   rattail/autocomplete/base
 
   rattail/autocomplete/customers
 
   rattail/batch/custorder
 
   rattail/batch/handheld
 
   rattail/batch/handlers
 
   rattail/batch/labels
 
   rattail/batch/pricing
 
   rattail/batch/product
 
   rattail/batch/purchase
 
   rattail/batch/vendorcatalog
 
   rattail/board
 
   rattail/bouncer/index
 
@@ -51,12 +52,13 @@ attributes and method signatures etc.
 
   rattail/importing/model
 
   rattail/importing/postgresql
 
   rattail/importing/rattail
 
   rattail/importing/sqlalchemy
 
   rattail/reporting/index
 
   rattail/reporting/handlers
 
   rattail/labels
 
   rattail/logging
 
   rattail/mail
 
   rattail/membership
 
   rattail/people
 
   rattail/problems/index
 
   rattail/products
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
 
@@ -24,12 +24,13 @@
 
   model.batch.labels
 
   model.batch.pricing
 
   model.batch.product
 
   model.batch.purchase
 
   model.batch.vendorcatalog
 
   model.datasync
 
   model.labels
 
   model.people
 
   model.products
 
   model.purchase
 
   model.stores
 
   model.users
 
   util
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
 
# -*- coding: utf-8; -*-
 
################################################################################
 
#
 
#  Rattail -- Retail Software Framework
 
#  Copyright © 2010-2018 Lance Edgar
 
#  Copyright © 2010-2022 Lance Edgar
 
#
 
#  This file is part of Rattail.
 
#
 
#  Rattail is free software: you can redistribute it and/or modify it under the
 
#  terms of the GNU General Public License as published by the Free Software
 
#  Foundation, either version 3 of the License, or (at your option) any later
 
@@ -40,24 +40,47 @@ class LabelProfile(Base):
 
    Represents a collection of settings for product label printing.
 
    """
 
    __tablename__ = 'label_profile'
 
    __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"
 
    other Rattail systems across the organization.
 
    """)
 

	
0 comments (0 inline, 0 general)