summaryrefslogtreecommitdiff
path: root/addons/google_calendar/models/google_sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/google_calendar/models/google_sync.py')
-rw-r--r--addons/google_calendar/models/google_sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/google_calendar/models/google_sync.py b/addons/google_calendar/models/google_sync.py
index f29302ce1f7..7fcb66f50b2 100644
--- a/addons/google_calendar/models/google_sync.py
+++ b/addons/google_calendar/models/google_sync.py
@@ -163,7 +163,8 @@ class GoogleSync(models.AbstractModel):
# This could be dangerous if google server time and odoo server time are different
updated = parse(gevent.updated)
odoo_record = self.browse(gevent.odoo_id(self.env))
- if updated >= pytz.utc.localize(odoo_record.write_date):
+ # Migration from 13.4 does not fill write_date. Therefore, we force the update from Google.
+ if not odoo_record.write_date or updated >= pytz.utc.localize(odoo_record.write_date):
vals = dict(self._odoo_values(gevent, default_reminders), need_sync=False)
odoo_record.write(vals)
synced_records |= odoo_record