[8.0>=] Calendar fix virtual id bugs

Hi,

This fix is simple and fix at least 2 bugs (which are not reproducible on the runbot...)

  File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1738, in search
    return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 1647, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0/openerp/addons/base/ir/ir_attachment.py", line 263, in _search
    access_rights_uid=access_rights_uid)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 4561, in _search
    query = self._where_calc(cr, user, args, context=context)
  File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/odoo/openerp-8.0-1218/openerp/models.py", line 4386, in _where_calc
    where_clause, where_params = e.to_sql()
  File "/home/odoo/openerp-8.0-1218/openerp/osv/expression.py", line 1245, in to_sql
    q, p = self.__leaf_to_sql(leaf)
  File "/home/odoo/openerp-8.0-1218/openerp/osv/expression.py", line 1229, in __leaf_to_sql
    params = model._columns[left]._symbol_set[1](right)
  File "/home/odoo/openerp-8.0-1218/openerp/osv/fields.py", line 241, in <lambda>
    _symbol_f = lambda x: int(x or 0)
ValueError: invalid literal for int() with base 10: '15-20141215070000'



The second one : 

File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 235, in wrapper
return new_api(self, args, *kwargs)
File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 552, in new_api
result = method(self._model, cr, uid, self.ids, args, *kwargs)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1555, in write
data = self.read(cr, uid, event_id, ['start', 'stop', 'rrule', 'duration'])
File "/home/odoo/openerp-8.0-1218/openerp/api.py", line 237, in wrapper
return old_api(self, args, *kwargs)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1631, in read
select = map(lambda x: (x, calendar_id2real_id(x)), select)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 1631, in 
select = map(lambda x: (x, calendar_id2real_id(x)), select)
File "/home/odoo/openerp-8.0/openerp/addons/calendar/calendar.py", line 44, in calendar_id2real_id
return int(real_id)
ValueError: invalid literal for int() with base 10: ''
You're right. And i have a new bug here (i'll made the modification): 


    def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
        '''
        convert the search on real ids in the case it was asked on virtual ids, then call super()
        '''
        for index in range(len(args)):
            if args[index][0] == "res_id" and isinstance(args[index][2], basestring):    

Fix : 

def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
        '''
        convert the search on real ids in the case it was asked on virtual ids, then call super()
        '''
        for index in range(len(args)):
            if args[index][0] == "res_id" and isinstance(args[index][2], str):