reporting Package¶
reporting
Package¶
Report generation
boleto
Module¶
-
class
stoqlib.reporting.boleto.
BoletoPDF
(file_descr, format=0)[source]¶ Bases:
object
-
FORMAT_BOLETO
= 0¶
-
FORMAT_CARNE
= 1¶
-
booklet
Module¶
-
class
stoqlib.reporting.booklet.
BookletReport
(filename, payments)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
-
title
= 'Booklets'¶
-
template_filename
= 'booklet/report.html'¶
-
callsreport
Module¶
A calls receipt implementation
-
class
stoqlib.reporting.callsreport.
CallsReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
Realized calls to client report
-
title
= 'Calls Report'¶
-
main_object_name
= ('call', 'calls')¶
-
clientcredit
Module¶
Client credit report implementation
financial
Module¶
inventory
Module¶
Inventory report implementation
-
class
stoqlib.reporting.inventory.
InventoryReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
Simple report for Inventory objs
-
title
= 'Inventory Listing'¶
-
main_object_name
= ('inventory entry', 'inventory entries')¶
-
labelreport
Module¶
loanreceipt
Module¶
payment
Module¶
Payment receival report implementation
-
class
stoqlib.reporting.payment.
ReceivablePaymentReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.payment._BasePaymentReport
This report shows a list of receivable payments. For each payment it shows: payment number, description, drawee, due date, paid date, status and value.
-
class
stoqlib.reporting.payment.
PayablePaymentReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.payment._BasePaymentReport
This report shows a list of payable payments. For each payment it shows: payment number, description, supplier, due date, paid date, status and value.
-
class
stoqlib.reporting.payment.
BillCheckPaymentReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.payment._BasePaymentReport
This report shows a list of Gpayments and some information about the bill or check method payment (if available) like: the bank id, the bank branch, the bank account. The field payment_number in the report can be the check number or the bill number.
-
class
stoqlib.reporting.payment.
CardPaymentReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.payment._BasePaymentReport
This report shows a list of information about the card method payment. For each payment it show: payment number, description, drawee, credit provider, due date, value, fee and fee calculation.
-
class
stoqlib.reporting.payment.
PaymentFlowHistoryReport
(filename, payment_histories)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
-
title
= u'Payment Flow History'¶
-
template_filename
= 'payment_flow_history/payment_flow_history.html'¶
-
complete_header
= False¶
-
-
class
stoqlib.reporting.payment.
AccountTransactionReport
(filename, objectlist, transactions, account, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
main_object_name
= ('transaction', 'transactions')¶
-
paymentsreceipt
Module¶
-
class
stoqlib.reporting.paymentsreceipt.
BasePaymentReceipt
(filename, payment, order, date, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
Base account receipt
-
title
= 'Payment receipt'¶
-
template_filename
= 'payment_receipt/payment_receipt.html'¶
-
complete_header
= True¶
-
-
class
stoqlib.reporting.paymentsreceipt.
InPaymentReceipt
(filename, payment, order, date, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.paymentsreceipt.BasePaymentReceipt
Accounts receivable receipt
product
Module¶
Products report implementation
-
class
stoqlib.reporting.product.
ProductReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of all products returned by a SearchBar, listing both its description and its balance in the stock selected.
-
title
= 'Product Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
-
class
stoqlib.reporting.product.
ProductBrandReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of all products brand returned by a SearchBar, listing both its brand and its product quantity in the stock selected.
-
title
= 'Brand Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
summary
= ['quantity']¶
-
-
class
stoqlib.reporting.product.
ProductBrandByBranchReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectTreeReport
This report show a list of all products brand by branch returned by a SearchBar, listing both its brand and its product quantity in the stock selected.
-
title
= 'Brand by branch Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
summary
= ['quantity']¶
-
-
class
stoqlib.reporting.product.
SimpleProductReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Product Listing'¶
-
summary
= ['stock']¶
-
-
class
stoqlib.reporting.product.
ProductPriceReport
(filename, products, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.TableReport
This report show a list of all products returned by a SearchBar, listing both its description and price in the selected stock.
-
title
= 'Product Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
-
class
stoqlib.reporting.product.
ProductQuantityReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of all products returned by a SearchBar, listing both its description, quantity solded and quantity received.
-
title
= 'Product Listing'¶
-
main_object_name
= ('product', 'products')¶
-
summary
= ['quantity_sold', 'quantity_received', 'quantity_transfered', 'quantity_produced', 'quantity_lost', 'quantity_consumed']¶
-
-
class
stoqlib.reporting.product.
ProductsSoldReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report lists all products sold with the average stock cost for a given period of time.
-
title
= 'Products Sold Listing'¶
-
main_object_name
= ('product sold', 'products sold')¶
-
-
class
stoqlib.reporting.product.
ProductCountingReport
(filename, data, title=None, blocked_records=0, status_name=None, filter_strings=None, status=None)[source]¶ Bases:
stoqlib.reporting.report.TableReport
This report shows a list of all products returned by a Searchbar and it leaves several fields in blank, like quantity, partial value and total value. These fields must be filled out in the counting process, manually.
-
title
= 'Product Counting'¶
-
main_object_name
= ('product', 'products')¶
-
-
class
stoqlib.reporting.product.
ProductStockReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Product Stock Report'¶
-
main_object_name
= ('product', 'products')¶
-
-
class
stoqlib.reporting.product.
ProductClosedStockReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Closed Product Stock Report'¶
-
main_object_name
= ('product', 'products')¶
-
production
Module¶
Production report implementation
-
class
stoqlib.reporting.production.
ProductionItemReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of all production items returned by a SearchBar, listing both its description, category and its quantities.
-
title
= 'Production Item Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
summary
= ['quantity', 'produced', 'lost']¶
-
purchase
Module¶
Purchase report implementation
-
class
stoqlib.reporting.purchase.
PurchaseReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Purchase Order Report'¶
-
main_object_name
= ('order', 'orders')¶
-
filter_format_string
= 'with status <u>%s</u>'¶
-
summary
= ['total', 'ordered_quantity', 'received_quantity']¶
-
-
class
stoqlib.reporting.purchase.
PurchasedItemsReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Purchases Items Report'¶
-
main_object_name
= ('items', 'items')¶
-
summary
= ['purchased', 'received', 'stocked']¶
-
purchasereceival
Module¶
Purchase receival report implementation
report
Module¶
-
class
stoqlib.reporting.report.
HTMLReport
(filename)[source]¶ Bases:
object
-
template_filename
= None¶
-
title
= ''¶
-
complete_header
= True¶
-
-
class
stoqlib.reporting.report.
TableReport
(filename, data, title=None, blocked_records=0, status_name=None, filter_strings=None, status=None)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
A report that contains a single table.
Subclasses must implement get_columns and get_row, and can optionaly implement accumulate, reset and get_summary_row.
-
subtitle_template
= 'Listing {rows} of a total of {total_rows} {item}'¶
-
main_object_name
= ('item', 'items')¶
-
filter_format_string
= ''¶
-
complete_header
= False¶
-
template_filename
= 'objectlist.html'¶
-
title
= None¶ The title of the report. Will be present in the header.
-
accumulate
(row)[source]¶ This method is called once for each row in the report.
Here you can create summaries (like the sum of all payments) for the report, that will be added in the last row of the table
-
reset
()[source]¶ This is called when the iteration on all the rows starts.
Use this to setup or reset any necesary data (like the summaries)
-
get_summary_row
()[source]¶ If the table needs a summary row in the end, this method should return the list of values that will be in this last row.
The values should already be formatted for presentation.
-
get_columns
()[source]¶ Get the columns for this table report.
This should return a list of dictionaries defining each column in the table. The dictionaries should define the keys ‘title’, with the string that will be in the header of the table and ‘align’, for adjusting the alignment of the column (‘left’, ‘right’ or ‘center’)
-
-
class
stoqlib.reporting.report.
ObjectListReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.TableReport
Creates an pdf report from an objectlist and its current state
This report will only show the columns that are visible, in the order they are visible. It will also show the filters that were enabled when the report was generated.
-
summary
= []¶ Defines the columns that should have a summary in the last row of the report. This is a list of strings defining the attribute of the respective column. Currently, only numeric values are supported (Decimal, currenty, etc..).
-
accumulate
(row)[source]¶ This method is called once for each row in the report.
Here you can create summaries (like the sum of all payments) for the report, that will be added in the last row of the table
-
-
class
stoqlib.reporting.report.
ObjectTreeReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
Creates an pdf report from an objecttree and its current state
This report will only show the columns that are visible, in the order they are visible. It will also show the filters that were enabled when the report was generated. And finnally display parent row in bold and children row shifted a little bit to the right
-
template_filename
= 'objecttree.html'¶
-
sale
Module¶
Sales report implementation
-
class
stoqlib.reporting.sale.
SaleOrderReport
(filename, order)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
Transfer Order receipt This class builds the namespace used in template
-
template_filename
= 'sale/sale.html'¶
-
title
= 'Sale Order'¶
-
complete_header
= True¶
-
-
class
stoqlib.reporting.sale.
SalesReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Sales Report'¶
-
main_object_name
= ('sale', 'sales')¶
-
filter_format_string
= 'with status <u>%s</u>'¶
-
summary
= ['total', 'total_quantity']¶
-
-
class
stoqlib.reporting.sale.
ReturnedSalesReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Returned Sales Report'¶
-
-
class
stoqlib.reporting.sale.
ReturnedItemReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Returned Items Report'¶
-
-
class
stoqlib.reporting.sale.
SoldItemsByClientReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Sales By Client Report'¶
-
-
class
stoqlib.reporting.sale.
SoldItemsByBranchReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of sold items by branch. For each item it show: product code, product description, branch name, sold quantity and total.
-
title
= 'Sold Items by Branch Report'¶
-
summary
= ['quantity', 'total']¶
-
template_filename
= 'sale/sold_items_by_branch.html'¶
-
-
class
stoqlib.reporting.sale.
SalesPersonReport
(filename, payments_list, salesperson, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.TableReport
-
title
= 'Sales'¶
-
salereturn
Module¶
Sale return implementation
-
class
stoqlib.reporting.salereturn.
SaleReturnReport
(filename, store, client, returned_sale, returned_sale_items)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
Return sales report. Show client information, returned sale and returned items informations
-
template_filename
= 'return_sale/return_sale.html'¶
-
title
= 'Sale Return'¶
-
complete_header
= False¶
-
client
= None¶
-
returned_sale
= None¶
-
returned_items
= None¶
-
service
Module¶
Services report implementation
-
class
stoqlib.reporting.service.
ServiceReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of services returned by a SearchBar, listing both its description, cost and price.
-
title
= 'Service Listing'¶
-
filter_format_string
= 'on branch <u>%s</u>'¶
-
main_object_name
= ('service', 'services')¶
-
-
class
stoqlib.reporting.service.
ServicePriceReport
(filename, data, title=None, blocked_records=0, status_name=None, filter_strings=None, status=None)[source]¶ Bases:
stoqlib.reporting.report.TableReport
This report show a list of services and it’s prices.
-
title
= 'Service Listing'¶
-
main_object_name
= ('service', 'services')¶
-
stockdecrease
Module¶
A Manual stock decrease receipt implementation
-
class
stoqlib.reporting.stockdecrease.
StockDecreaseReceipt
(filename, order)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
-
template_filename
= 'stock_decrease/stock_decrease.html'¶
-
title
= 'Manual Stock Decrease Receipt'¶
-
complete_header
= False¶
-
-
class
stoqlib.reporting.stockdecrease.
StockDecreaseReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Stock decrease report'¶
-
main_object_name
= ('stock decrease', 'stock decreases')¶
-
till
Module¶
Till report implementation
-
class
stoqlib.reporting.till.
TillHistoryReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
This report show a list of the till history returned by a SearchBar, listing both its description, date and value.
-
title
= 'Till History Listing'¶
-
main_object_name
= ('till entry', 'till entries')¶
-
summary
= ['value']¶
-
transfer
Module¶
A transfer receipt implementation
-
class
stoqlib.reporting.transfer.
TransferOrderReceipt
(filename, order)[source]¶ Bases:
stoqlib.reporting.report.HTMLReport
Transfer Order receipt This class builds the namespace used in template
-
template_filename
= 'transfer/transfer.html'¶
-
title
= 'Transfer Receipt'¶
-
complete_header
= False¶
-
-
class
stoqlib.reporting.transfer.
TransferOrderReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Transfer report'¶
-
main_object_name
= ('transfer', 'transfers')¶
-
-
class
stoqlib.reporting.transfer.
TransferItemReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Transfer item report'¶
-
main_object_name
= ('transfer item', 'transfer items')¶
-
utils
Module¶
Useful functions related to reports building and visualization.
workorder
Module¶
Work order reports implementation
-
class
stoqlib.reporting.workorder.
WorkOrdersReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
-
title
= 'Work orders report'¶
-
main_object_name
= ('work order', 'work orders')¶
-
filter_format_string
= 'with status <u>%s</u>'¶
-
summary
= ['total']¶
-
person
Module¶
-
class
stoqlib.reporting.person.
ClientsWithSaleReport
(filename, objectlist, data, *args, **kwargs)[source]¶ Bases:
stoqlib.reporting.report.ObjectListReport
Base report for Payable and Receivable reports
-
title
= 'Clients With Sale'¶
-
main_object_name
= ('client', 'clients')¶
-
summary
= ['n_sales', 'total_amount']¶
-