summaryrefslogtreecommitdiff
path: root/addons/google_calendar/data
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/google_calendar/data
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/google_calendar/data')
-rw-r--r--addons/google_calendar/data/google_calendar_data.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/addons/google_calendar/data/google_calendar_data.xml b/addons/google_calendar/data/google_calendar_data.xml
new file mode 100644
index 00000000..d0ed9c9f
--- /dev/null
+++ b/addons/google_calendar/data/google_calendar_data.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <data>
+ <record forcecreate="True" id="ir_cron_sync_all_cals" model="ir.cron">
+ <field name="name">Google Calendar: synchronization</field>
+ <field name="model_id" ref="model_res_users"/>
+ <field name="state">code</field>
+ <field name="code">
+# LUL TODO check this comment
+# The context key 'last_sync_hours' allows specifying the minimum delay between consecutive syncs.
+# Indeed, in case there are many users / events to sync, the cron might time out. In this case, the
+# solution is to force the last_sync_hours to the expected synchronization interval expected. This
+# will avoid the synchronization of users that succeeded in the previous failing cron.
+model._sync_all_google_calendar()
+ </field>
+ <field name="user_id" ref="base.user_root" />
+ <field name="interval_number">12</field>
+ <field name="interval_type">hours</field>
+ <field name="numbercall">-1</field>
+ <field eval="False" name="doall" />
+ </record>
+ </data>
+</odoo>