Jalpesh Patel(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-traceback-issues1-messaging-pja into 
lp:~openerp-dev/openobject-addons/trunk-traceback_issue1-nco.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-traceback-issues1-messaging-pja/+merge/136361

Hello,

   I have fix problem of Messaging > Organizer > Calendar: Create a recurrent 
meeting reload the page and from the calendar try to open that meeting it's 
given traceback.
   
Thanks!
pja
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-traceback-issues1-messaging-pja/+merge/136361
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-traceback_issue1-nco.
=== modified file 'base_calendar/crm_meeting.py'
--- base_calendar/crm_meeting.py	2012-10-24 19:59:39 +0000
+++ base_calendar/crm_meeting.py	2012-11-27 10:42:20 +0000
@@ -66,6 +66,15 @@
         'state': 'open',
     }
 
+    def message_get_subscription_data(self, cr, uid, ids, context=None):
+        res = {}
+        for virtual_id in ids:
+            real_id = base_calendar.base_calendar_id2real_id(virtual_id)
+            result = super(crm_meeting, self).message_get_subscription_data(cr, uid, [real_id], context=context)
+            res[virtual_id] = result[real_id]
+        return res
+
+    
     def copy(self, cr, uid, id, default=None, context=None):
         default = default or {}
         default['attendee_ids'] = False
@@ -115,3 +124,41 @@
 
     def case_close_send_note(self, cr, uid, ids, context=None):
         return self.message_post(cr, uid, ids, body=_("Meeting <b>completed</b>."), context=context)
+    
+class mail_message(osv.osv):
+    _inherit = "mail.message"
+    
+    def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
+         cal_event_pool = self.pool.get('calendar.event')
+         for arg in args:
+             if arg[0] == "res_id":
+                 if isinstance(arg[2], (str)):
+                     args[1][2] = cal_event_pool.remove_virtual_id(arg[2])
+         res = super(mail_message, self).search(cr, uid, args, offset, limit, order, context, count=False)
+         if count:
+             return len(res)
+         elif limit:
+             return res[offset:offset+limit]
+         else:
+             return res
+        
+mail_message()
+
+class ir_attachment(osv.osv):
+    _inherit = "ir.attachment"
+
+    def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
+         cal_event_pool = self.pool.get('calendar.event')
+         for arg in args:
+             if arg[0] == "res_id":
+                 if isinstance(arg[2], (str)):
+                     args[1][2] = cal_event_pool.remove_virtual_id(arg[2])
+         res = super(ir_attachment, self).search(cr, uid, args, offset, limit, order, context, count=False)
+         if count:
+             return len(res)
+         elif limit:
+             return res[offset:offset+limit]
+         else:
+             return res
+            
+    
\ No newline at end of file

_______________________________________________
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