[FIX] odex_takaful
This commit is contained in:
parent
afe10dc220
commit
a69dde6a8a
|
|
@ -31,3 +31,4 @@ from . import donation_replacement_log
|
||||||
from . import payment_machine
|
from . import payment_machine
|
||||||
|
|
||||||
from . import benefit_category
|
from . import benefit_category
|
||||||
|
from . import mail_message
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
from odoo import models, api
|
||||||
|
|
||||||
|
|
||||||
|
class Message(models.Model):
|
||||||
|
_inherit = 'mail.message'
|
||||||
|
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _find_allowed_model_wise(self, doc_model, doc_dict):
|
||||||
|
doc_ids = list(doc_dict)
|
||||||
|
allowed_doc_ids = self.env[doc_model].with_context(active_test=False).search([('id', 'in', doc_ids)]).ids
|
||||||
|
return set([message_id for allowed_doc_id in allowed_doc_ids if allowed_doc_id in doc_dict for message_id in doc_dict[allowed_doc_id]])
|
||||||
Loading…
Reference in New Issue