[NEW] event_track_calendar_event*

This commit is contained in:
clementthomas
2024-01-17 12:52:58 +01:00
parent c597b82c44
commit 7414bb774d
11 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models, api, Command
class EventRegistration(models.Model):
_inherit = "event.registration"
def write(self, vals):
res = super().write(vals)
for registration in self:
for track in registration.event_id.track_ids:
track.sync_calendar_event()
return res
@api.model_create_multi
def create(self, vals_list):
res = super(EventRegistration, self).create(vals_list)
for registration in res:
for track in registration.event_id.track_ids:
track.sync_calendar_event()
return res