[IMP] event_track_calendar_event*:

change behaviour to allow multiple dates (calendar events) to event tracks
This commit is contained in:
clementthomas
2024-02-28 12:03:30 +01:00
parent a8467735f2
commit 3ed3a7fae4
8 changed files with 96 additions and 65 deletions

View File

@@ -1,8 +1,17 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo import fields, models, api, Command
class CalendarEvent(models.Model):
_inherit = 'calendar.event'
event_track_id = fields.Many2one('event.track', "Event track")
@api.model_create_multi
def create(self, vals_list):
res = super(CalendarEvent,self).create(vals_list)
for event in res:
if event.event_track_id:
event.event_track_id.sync_calendar_event()