'Handles data sent from the bank statement reconciliation widget (and can otherwise serve as an old-API bridge)
:param list of dicts data: must contains the keys \'counterpart_aml_dicts\', \'payment_aml_ids\' and \'new_aml_dicts\',
whose value is the same as described in process_reconciliation except that ids are used instead of recordsets.'

@api.multi
def process_reconciliations(self, data):

    AccountMoveLine = self.env['account.move.line']
    for (st_line, datum) in zip(self, data):
        payment_aml_rec = AccountMoveLine.browse(datum.get('payment_aml_ids', []))
        for aml_dict in datum.get('counterpart_aml_dicts', []):
            aml_dict['move_line'] = AccountMoveLine.browse(aml_dict['counterpart_aml_id'])
            del aml_dict['counterpart_aml_id']
        st_line.process_reconciliation(datum.get('counterpart_aml_dicts', []), payment_aml_rec, datum.get('new_aml_dicts', []))
