Return values from appointment actions

This commit is contained in:
metatroncubeswdev 2026-04-27 12:03:51 -04:00
parent cd8f1812ff
commit 6ef5b53c75

View File

@ -105,6 +105,7 @@ class McsAppointmentBooking(models.Model):
else: else:
booking.calendar_event_id = self.env["calendar.event"].sudo().create(event_vals).id booking.calendar_event_id = self.env["calendar.event"].sudo().create(event_vals).id
booking.state = "confirmed" booking.state = "confirmed"
return True
def action_cancel(self): def action_cancel(self):
for booking in self: for booking in self:
@ -112,3 +113,4 @@ class McsAppointmentBooking(models.Model):
if booking.calendar_event_id: if booking.calendar_event_id:
booking.calendar_event_id.sudo().unlink() booking.calendar_event_id.sudo().unlink()
booking.calendar_event_id = False booking.calendar_event_id = False
return True