def _timesheets_callback(self, callback):
def call(*args, **kwargs):<EOL><INDENT>return_values = []<EOL>for timesheet in self:<EOL><INDENT>attr = getattr(timesheet, callback)<EOL>if callable(attr):<EOL><INDENT>result = attr(*args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>result = attr<EOL><DEDENT>return_values.append(result)<EOL><DEDENT>return return_values<EOL><DEDENT>return call<EOL>
Call a method on all the timesheets, aggregate the return values in a
list and return it.