banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #01664
Re: [Merge] lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-related-balance-check into lp:banking-addons/bank-statement-reconcile-7.0
Review: Needs Fixing code review
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):
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
Regards.
--
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-related-balance-check/+merge/209723
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons/bank-statement-reconcile-7.0.
References