This page contains developer documentation for the Supplier class importable from supplierclass_xxx - currently, more a notepad for me than real documentation.
For importing this class from the module, {xxx} can either be 'generic' or a key into suppliers.supplier_module which then bases on and extends the generic supplier class.
Contents
Public methods
Supplier.__init__()
(Supplier) = Supplier( [supID = 0] )
Data presentation
Supplier.__str__()
(string) = __str__()
Priceinfo maintenance
Supplier.update_priceinfo()
update_priceinfo( ID = '', [arg1 = None], [arg2 = None], [arg3 = None] )
Order generation
Supplier.format_order()
(string) = format_order(
partlist = {},
format = 'txt'
)
The order items are given in the partlist dictionary as follows:
{ n: {'quant': int, 'unitsize': int, 'ordercode': string, 'ppu': int, 'description': string, 'invID': int}, \
n+1: {...}, \
...
}
For future extensions, the partlist required format can be queried from the Supplier.order_partlist_format() function which accepts no parameters and returns a string. It is otherwise undocumented and might be unused (and unusable due to lack of formal specification of the output) at the moment.
Items are ordered by the dictionary key n in string output in each supported format.
Formats supported by the respective order class can be queried from Supplier.order_supported_formats().
Supplier.order_supported_formats()
([string, ...]) = order_supported_formats()
Private methods
Order generation
format_order_XXX()
(string) = format_order_XXX( partlist = [] )
partlist contains the data described for Supplier.format_order() above.
the generic Supplier class defines simple default format methods for 'html' and 'txt', giving HTML table and plaintext ASCII output, using the suppliers.order_txt template data, and doing keyword substitution in it.
THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.
For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.