Nimesh Contractor(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-caldav_recurrent_fix-nco into 
lp:openobject-addons.

Requested reviews:
  Roberto López López (OpenERP) (rlo-openerp)
  Harry (OpenERP) (hmo-tinyerp)
  Atul Patel(OpenERP) (atp-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-caldav_recurrent_fix-nco/+merge/121367

Hello sir,
             
               Merged with latest addons and done the changes  as per your 
suggestion.
        
Thanks,
 NCO.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-caldav_recurrent_fix-nco/+merge/121367
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-caldav_recurrent_fix-nco.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py	2012-08-10 10:22:57 +0000
+++ base_calendar/base_calendar.py	2012-08-27 06:28:22 +0000
@@ -1124,7 +1124,6 @@
         @param limit: The Number of Results to Return """
         if not context:
             context = {}
-
         result = []
         for data in super(calendar_event, self).read(cr, uid, select, context=context):
             if not data['rrule']:
@@ -1173,9 +1172,7 @@
 
         if isinstance(select, (str, int, long)):
             return ids and ids[0] or False
-        else:
-            ids = list(set(result))
-        return ids
+        return result
 
     def compute_rule_string(self, datas):
         """
@@ -1422,7 +1419,27 @@
                     del re[groupname + "_count"]
             re.get('__context', {}).update({'virtual_id' : virtual_id})
         return res
+    def browse(self, cr, uid, ids, context=None, list_class=None, fields_process=None):
+        """
+        Overrides orm browse method.
+        @param self: the object pointer
+        @param cr: the current row, from the database cursor,
+        @param uid: the current user’s ID for security checks,
+        @param ids: List of crm meeting's ids
+        @param context: A standard dictionary for contextual values
+        @return: the object list.
+        """
+        if isinstance(ids, (str, int, long)):
+            select = [ids]
+        else:
+            select = ids
+        select = map(lambda x: base_calendar_id2real_id(x), select)
+        res = super(calendar_event, self).browse(cr, uid, select, context, \
+                                                    list_class, fields_process)
+        if isinstance(ids, (str, int, long)):
+            return res and res[0] or False
 
+        return res
     def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
         # FIXME This whole id mangling has to go!
         if context is None:

=== modified file 'caldav/calendar.py'
--- caldav/calendar.py	2012-08-07 11:34:14 +0000
+++ caldav/calendar.py	2012-08-27 06:28:22 +0000
@@ -371,7 +371,7 @@
                         #START
                         model_obj = self.pool.get(model)
                         r_ids = []
-                        if model_obj._columns.get('recurrent_uid', None):
+                        if model_obj._columns.get('recurrent_uid', None) and isinstance(data['map_field'], int):
                             cr.execute('SELECT id FROM %s WHERE recurrent_uid=%%s' % model_obj._table,
                                         (data[map_field],))
                             r_ids = map(lambda x: x[0], cr.fetchall())

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to