20 lines
620 B
Python
20 lines
620 B
Python
from odoo import models
|
|
|
|
|
|
class ProjectTask(models.Model):
|
|
_name = 'project.task'
|
|
_inherit = ["project.task", "directive.mixin"]
|
|
|
|
def directive_on_done_post_message(self, payload: dict):
|
|
for task in self:
|
|
task.message_post(
|
|
body=f"Директива выполнена: {payload.get('directive_name')})"
|
|
)
|
|
return True
|
|
|
|
def action_demo_directive_callback(self):
|
|
for task in self:
|
|
task.message_post(body="Demo callback executed")
|
|
self._directive_run_callback_policies("action_demo_directive_callback")
|
|
return True
|