|
@ -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 |
|
|