From 2550c8c99be6146704ec999467ab6afe2c73e6d9 Mon Sep 17 00:00:00 2001 From: RemiFr82 Date: Mon, 30 Sep 2024 11:57:07 +0200 Subject: [PATCH] [IMP] event_type_description --- event_type_description/models/event_event.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/event_type_description/models/event_event.py b/event_type_description/models/event_event.py index d4b445f..52cf5b0 100644 --- a/event_type_description/models/event_event.py +++ b/event_type_description/models/event_event.py @@ -12,21 +12,20 @@ class EventEvent(models.Model): readonly=False, # default="", ) - can_push = fields.Boolean( - "Can push description", - compute="_get_can_push", - ) can_pull = fields.Boolean( "Can pull description", compute="_get_can_pull", + store=True, + ) + can_push = fields.Boolean( + "Can push description", + compute="_get_can_push", ) @api.depends("event_type_id") def _compute_description(self): for event in self: - if event.event_type_id and not is_html_empty( - event.event_type_id.description - ): + if event.can_pull: event.description = event.event_type_id.description # Pull from template