Browse Source

[IMP] event_type_description

16.0
RemiFr82 2 months ago
parent
commit
2550c8c99b
  1. 13
      event_type_description/models/event_event.py

13
event_type_description/models/event_event.py

@ -12,21 +12,20 @@ class EventEvent(models.Model):
readonly=False, readonly=False,
# default="", # default="",
) )
can_push = fields.Boolean(
"Can push description",
compute="_get_can_push",
)
can_pull = fields.Boolean( can_pull = fields.Boolean(
"Can pull description", "Can pull description",
compute="_get_can_pull", compute="_get_can_pull",
store=True,
)
can_push = fields.Boolean(
"Can push description",
compute="_get_can_push",
) )
@api.depends("event_type_id") @api.depends("event_type_id")
def _compute_description(self): def _compute_description(self):
for event in 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 event.description = event.event_type_id.description
# Pull from template # Pull from template

Loading…
Cancel
Save