|
|
@ -653,6 +653,21 @@ class KalachakraEvent(models.Model): |
|
|
|
#event = service.events().get(calendarId=self.calendar_id, eventId=self.calendar_event_id).execute() |
|
|
|
updated_event = service.events().update(calendarId=self.calendar_id, eventId=self.calendar_event_id, body=body).execute() |
|
|
|
|
|
|
|
def update_date_event(self,event_name,date_begin,hour_begin,hour_end): |
|
|
|
event_name='Med' |
|
|
|
date_begin='2023-03-24' |
|
|
|
hour_begin=hour_begin-2 |
|
|
|
hour_end=hour_end-2 |
|
|
|
|
|
|
|
evt=self.env['event.event'].search([('name','=',event_name),('date_begin','>',date_begin)]) |
|
|
|
for e in evt: |
|
|
|
vals={} |
|
|
|
vals['date_begin']=e.date_begin.replace(hour=hour_begin) |
|
|
|
vals['date_end']=e.date_end.replace(hour=hour_end) |
|
|
|
e.write(vals) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EventTag(models.Model): |
|
|
|
_inherit = "event.tag" |
|
|
|
_description = 'Event tag' |
|
|
|