Indent Dox Module (tendril.dox.indent
)¶
This module provides functions to generate stock / inventory indents.
The functions here use the tendril.dox.render
module to actually
produce the output files after constructing the appropriate stage.
See also
Document Generators
gen_stock_idt_from_cobom (outfolder, sno, ...) |
Generates a stock indent from a tendril.boms.outputbase.CompositeOutputBom instance. |
-
tendril.dox.indent.
gen_stock_idt_from_cobom
(outfolder, sno, title, carddict, cobom, verbose=True)[source]¶ Generates a stock indent from a
tendril.boms.outputbase.CompositeOutputBom
instance. This function also addsIDT
labels for all the stock / inventory items that are requested for by the indent to thetendril.dox.labelmaker.manager
, though the caller should make sure that the labels are written out after the fact.Note
This function does not register the document in the
tendril.dox.docstore
. You should use the output file path (returned by this function) to register the document when desired.Parameters: - outfolder (str) – The folder within which the output PDF should be created.
- sno (str) – The serial number of the Indent
- title – The title of the Indent
- carddict (dict or str) – Either a pre-constructed string, or a dictionary containing the list of card types included for the indent (keys) and the quantity for each (values).
- cobom (
tendril.boms.outputbase.CompositeOutputBom
) – The composite output BOM, including the BOMs for the cards that the indent is being constructed for.
Returns: The output file path.
Template Used
tendril\dox\templates\indent_stock_template.tex
(Included version
)Stage Keys Provided
sno
The serial number of the indent. title
Whether the device is a PCB or a Cable. lines
List of dictionaries, each containing the ident
andqty
of one line in the indent.cards
A string listing out the various cards the indent was generated to request components for.