[FIX] Avoid CacheMiss errors

Avoid CacheMiss errors setting a value on message_content field.
This commit is contained in:
Eduardo De Miguel 2022-04-20 13:24:43 +02:00
parent 0628e395dd
commit ee89ccbbaa

View File

@ -29,10 +29,14 @@ class MailThread(models.AbstractModel):
message_content = fields.Text(
help="Message content, to be used only in searches",
compute=lambda self: False,
compute="_compute_message_content",
search="_search_message_content",
)
def _compute_message_content(self):
# Always assign a value to avoid CacheMiss errors
self.message_content = False
@api.model
def fields_view_get(
self, view_id=None, view_type="form", toolbar=False, submenu=False