'Used to validate a batch of reconciliations in a single call
:param data: list of dicts containing:
- \'type\': either \'partner\' or \'account\'
- \'id\': id of the affected res.partner or account.account
- \'mv_line_ids\': ids of exisiting account.move.line to reconcile
- \'new_mv_line_dicts\': list of dicts containing values suitable for account_move_line.create()'

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

    for datum in data:
        if ((len(datum['mv_line_ids']) >= 1) or ((len(datum['mv_line_ids']) + len(datum['new_mv_line_dicts'])) >= 2)):
            self.env['account.move.line'].browse(datum['mv_line_ids']).process_reconciliation(datum['new_mv_line_dicts'])
        if (datum['type'] == 'partner'):
            partners = self.env['res.partner'].browse(datum['id'])
            partners.mark_as_reconciled()
        if (datum['type'] == 'account'):
            accounts = self.env['account.account'].browse(datum['id'])
            accounts.mark_as_reconciled()
