[FIX] Calendar mail_message : check context before to use it

bzr revid: jke@openerp.com-20140401161440-w2jjr0a5u49lwnsj
This commit is contained in:
Kersten Jeremy 2014-04-01 18:14:40 +02:00
parent 11af46b2b1
commit 9f7ba14253
1 changed files with 2 additions and 0 deletions

View File

@ -1582,6 +1582,8 @@ class mail_message(osv.Model):
return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
if context is None:
context = {}
if doc_model == 'calendar.event':
order = context.get('order', self._order)
for virtual_id in self.pool[doc_model].get_recurrent_ids(cr, uid, doc_dict.keys(), [], order=order, context=context):