[FIX] calendar: detaching event makes recurring attributes irrelevant
Have a recurring meeting, repeated until some date Edit one of the instances and detach it (click on "update only this instance") Edit the detached event and change some value Save Before this commit, a JS error was thrown saying that the field final_date was invalid This was because the required attribute on this field was set to True, but the python put the value of the final_date to False After this commit, there is no error as we set this value to false, since the field doesn't make sense for a non-recurring event anyway OPW 1892426 closes odoo/odoo#28850
This commit is contained in:
@@ -1371,7 +1371,8 @@ class Meeting(models.Model):
|
||||
rrule_type=False,
|
||||
rrule='',
|
||||
recurrency=False,
|
||||
final_date=datetime.strptime(data.get('start'), DEFAULT_SERVER_DATETIME_FORMAT if data['allday'] else DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(hours=values.get('duration', False) or data.get('duration'))
|
||||
final_date=False,
|
||||
end_type=False
|
||||
)
|
||||
|
||||
# do not copy the id
|
||||
|
||||
Reference in New Issue
Block a user