Purchase Orders Dox Module (tendril.dox.purchaseorder
)¶
This module provides functions to generate purchase orders.
The underlying assumption made in this module is that Purchase Orders are relatively specific to vendors and include information that may be specific to the materials being purchased. While this approach does need streamlining, for the moment this works well enough to be functional.
Todo
Streamline the approach and the stage format.
The functions here use the tendril.dox.render
module to actually
produce the output files after constructing the appropriate stage.
See also
Document Generators
render_po (stage, templateid, outpath) |
Generates a purchase order using the template indicated by templateid . |
-
tendril.dox.purchaseorder.
render_po
(stage, templateid, outpath)[source]¶ Generates a purchase order using the template indicated by
templateid
.Parameters: Returns: The
outpath
.Template Used
This function uses a template specified by
templateid
, specifically, using the template namedpo_[templateid]_template.tex
.Stage Keys Provided
The contents of the
stage
provided to the jinja2 template are specific to each template, and it is the responsibility of the caller to make sure that it contains all the keys that the template expects. The parts of the stage defined by this function, common to all templates, are :no
The serial number of the purchase order, either from the stage
parameter or created.point
The name of the contact person, defined by tendril.utils.config.COMPANY_PO_POINT
.date
The purchase order date, either from the stage
parameter or today’s date.lcofile
The latex lcofile to use, defined by tendril.utils.config.COMPANY_PO_LCO_PATH