This commit is contained in:
2026-11-08 17:43:44 +08:00
parent 974a1fb10b
commit 3b5af1e3a6
483 changed files with 590466 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
from odoo import fields, models
class MailScheduledMessage(models.Model):
_inherit = 'mail.scheduled.message'
account_reports_annotation_date = fields.Date("Annotated For")
def _message_created_hook(self, message):
"""Hook called when a message is created from the scheduled message.
:param record message: the created mail.message record
"""
super()._message_created_hook(message)
if self.account_reports_annotation_date:
self.env['account.report.annotation'].with_user(self.create_uid).create({
'date': self.account_reports_annotation_date,
'message_id': message.id,
})