'Execute the select request and write the result in this wizard
:param query : the SQL query used to fill the wizard line'

@api.multi
def _process_query(self, query):

    self.ensure_one()
    model_mapping = self._compute_models()
    self._cr.execute(query)
    counter = 0
    for (min_id, aggr_ids) in self._cr.fetchall():
        partners = self.env['res.partner'].search([('id', 'in', aggr_ids)])
        if (len(partners) < 2):
            continue
        if (model_mapping and self._partner_use_in(partners.ids, model_mapping)):
            continue
        self.env['base.partner.merge.line'].create({'wizard_id': self.id, 'min_id': min_id, 'aggr_ids': partners.ids})
        counter += 1
    self.write({'state': 'selection', 'number_group': counter})
    _logger.info('counter:    %s', counter)
