Review: Needs Fixing

I think a more efficient and straightforward way would be something along those 
lines:

    [...]
    reconcile_obj = self.pool.get('account.move.reconcile')
    reconcile_ids = set()
    for move_line in move.line_id:
        if move_line.reconcile_id:
            reconcile_ids.add(move_line.reconcile_id.id)
    reconcile_obj.unlink(cr, uid, list(reconcile_ids), context=context)
    return [...]
    
So you'll do only 1 DELETE at the end of the loop.
-- 
https://code.launchpad.net/~camptocamp/banking-addons/already_delete_reconcile_id/+merge/177149
Your team Banking Addons Core Editors is subscribed to branch 
lp:banking-addons/bank-statement-reconcile-70.

-- 
Mailing list: https://launchpad.net/~banking-addons-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~banking-addons-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to