[FIX] fix helper

This commit is contained in:
Sébastien BEAU
2019-02-25 15:57:56 +01:00
parent 27fa44c68f
commit 6ce749c70f

View File

@@ -14,5 +14,7 @@ class MailMessage(models.Model):
# we do not use a reference field here as mail message
# are used everywhere and many model are not yet loaded
# so odoo raise exception
if self:
self.ensure_one()
return self.env[self.model].browse(self.res_id)
return None