def __init__(self, databaseconnection): """Initialise PurchaseOrderList. Takes a DB-API Connection object""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); import TableConstructors TableConstructors.createPurchaseOrderList(self.cursor) TableConstructors.createContractedItems(self.cursor) TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createPlanningItems(self.cursor) self.purchaseorder=None
def __init__(self, databaseconnection, taskgroupid): """Initialise TransactionCreator. Takes a DB-API Connection object and a task group id""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); import TableConstructors TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createContractedItems(self.cursor) TableConstructors.createCertificates(self.cursor) self.taskgroupid=taskgroupid self.filters={}
def __init__(self, databaseconnection,purchaseorder): """Initialise CertificateCreator. Takes a DB-API Connection object and a purchase order number""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); self.purchaseorder=purchaseorder import TableConstructors TableConstructors.createContractedItems(self.cursor) TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createCertificates(self.cursor) #self.selection is a list of ContractedTransactionId of the items that will be certified self.selection=[]