Instead of defining a function _us, you can use lambda for resolving that simple expression:
lambda self, cr, uid, ids, context=None: ids
The other store function is also bad constructed, because it's triggered on 'account.bank.statement', but you have to query 'account.statement.profile' object. This is the correct code (also putting arguments in their usual form):
def _get_statement_from_profile(self, cr, uid, ids, context=None):
triggered = []
profile_obj = self.pool['account.statement.profile']
for profile in profile_obj.browse(cr, uid, ids, context=context):
triggered += [st.id for st in profile.bank_statement_ids]
return triggered
Hi, Leonardo, thanks for the patch.
Instead of defining a function _us, you can use lambda for resolving that simple expression:
lambda self, cr, uid, ids, context=None: ids
The other store function is also bad constructed, because it's triggered on 'account. bank.statement' , but you have to query 'account. statement. profile' object. This is the correct code (also putting arguments in their usual form):
def _get_statement_ from_profile( self, cr, uid, ids, context=None): 'account. statement. profile' ] obj.browse( cr, uid, ids, context=context): bank_statement_ ids]
triggered = []
profile_obj = self.pool[
for profile in profile_
triggered += [st.id for st in profile.
return triggered
Regards.