def __init__(self, filename, objectlist, data, *args, **kwargs): person = kwargs.pop('person', None) if person: self.main_object_name = (_("performed call to %s") % person.name, _("performed calls to %s") % person.name) ObjectListReport.__init__(self, filename, objectlist, data, *args, **kwargs)
def accumulate(self, row): ObjectListReport.accumulate(self, row) # Total by Branch self.branch_total.setdefault(row.branch_name, 0) self.branch_quantity.setdefault(row.branch_name, 0) self.branch_total[row.branch_name] += row.total self.branch_quantity[row.branch_name] += row.quantity
def reset(self): ObjectListReport.reset(self) self.branch_total = {} self.branch_quantity = {}
def __init__(self, filename, objectlist, transactions, account, *args, **kwargs): self.title = _("Transactions for account %s") % (account.description, ) ObjectListReport.__init__(self, filename, objectlist, transactions, self.title, *args, **kwargs)