[FIX] calendar: fix call to get_recurrent_ids broken when migrating

get_recurrent_ids is a multi method. Model should be browsed before calling
the method.
This commit is contained in:
Denis Vermylen (dve)
2016-09-02 10:14:30 +02:00
committed by Thibault Delavallée
parent 48a1eaf792
commit b769b66f51
+1 -1
View File
@@ -26,6 +26,6 @@ class Message(models.Model):
def _find_allowed_model_wise(self, doc_model, doc_dict):
if doc_model == 'calendar.event':
order = self._context.get('order', self._order)
for virtual_id in self.env[doc_model].get_recurrent_ids(doc_dict.keys(), [], order=order):
for virtual_id in self.env[doc_model].browse(doc_dict.keys()).get_recurrent_ids([], order=order):
doc_dict.setdefault(virtual_id, doc_dict[get_real_ids(virtual_id)])
return super(Message, self)._find_allowed_model_wise(doc_model, doc_dict)