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,
# 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

Loading…
Cancel
Save