Public release from ruodoo-project: 19.0 - 2026-11-01 22:52:25 UTC
This commit is contained in:
19
directive_common/models/project_task.py
Normal file
19
directive_common/models/project_task.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
Reference in New Issue
Block a user