Hello, I find it hard to understand why there is not a central calendar for all modules to use just as there is for mail. Anyway, now that is off my chest, I am trying to update records in the calendar.event module when a date/time is changed in the project.task model. I have no problems creating the record but updating it is causing me some grief. Here is the code I am working on:
@api.model
def write(self, vals):
print("Vals==================", vals)
# self.env['calendar.event'].write('3', {"name": vals['name'], "start": vals['planned_date_begin'], "stop": vals['planned_date_end']})
return super(ProjectTask, self).write(vals)
# return super().write(vals)
When I call the super write with either method, I get the following error:
result = method(recs, *args, **kwargs)
TypeError: ProjectTask.write() takes 2 positional arguments but 3 were given
The above server error caused the following client error: null
I'm using v16.0.
Can anyone give me a few pointers as to how to fix it?
Thank you!