'If we are not in multiple locations, we can deactivate the internal
picking types of the warehouses, so they won\'t appear in the dashboard.
Otherwise, activate them.'

@api.multi
def set_group_stock_multi_locations(self):

    for config in self:
        if config.group_stock_multi_locations:
            active = True
            domain = []
        else:
            active = False
            domain = [('reception_steps', '=', 'one_step'), ('delivery_steps', '=', 'ship_only')]
        warehouses = self.env['stock.warehouse'].search(domain)
        warehouses.mapped('int_type_id').write({'active': active})
    return True
