summaryrefslogtreecommitdiff
path: root/addons/microsoft_calendar/views
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2020-04-21 13:08:35 +0000
committerjbm-odoo <jbm@odoo.com>2020-08-05 13:47:42 +0000
commit9dc3057e8eb82d9237457167641585655f249c3e (patch)
tree11975a957335d9dd3ce7f2dc0844fa8b5e7acff3 /addons/microsoft_calendar/views
parent78ef2ec8134b09d9732849a11ff8d9e1ac886bb5 (diff)
[ADD] calendar_microsoft: Synchronize Microsoft calendar with Odoo
TaskID 2223219 closes odoo/odoo#54936 Related: odoo/upgrade#1557 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/microsoft_calendar/views')
-rw-r--r--addons/microsoft_calendar/views/microsoft_calendar_templates.xml9
-rw-r--r--addons/microsoft_calendar/views/res_config_settings_views.xml20
-rw-r--r--addons/microsoft_calendar/views/res_users_views.xml26
3 files changed, 55 insertions, 0 deletions
diff --git a/addons/microsoft_calendar/views/microsoft_calendar_templates.xml b/addons/microsoft_calendar/views/microsoft_calendar_templates.xml
new file mode 100644
index 00000000000..596d90ae8dc
--- /dev/null
+++ b/addons/microsoft_calendar/views/microsoft_calendar_templates.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <template id="assets_backend" name="microsoft_calendar assets" inherit_id="web.assets_backend">
+ <xpath expr="." position="inside">
+ <link rel="stylesheet" type="text/scss" href="/microsoft_calendar/static/src/scss/microsoft_calendar.scss"/>
+ <script type="text/javascript" src="/microsoft_calendar/static/src/js/microsoft_calendar.js"></script>
+ </xpath>
+ </template>
+</odoo>
diff --git a/addons/microsoft_calendar/views/res_config_settings_views.xml b/addons/microsoft_calendar/views/res_config_settings_views.xml
new file mode 100644
index 00000000000..4156b7a353f
--- /dev/null
+++ b/addons/microsoft_calendar/views/res_config_settings_views.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="res_config_settings_view_form" model="ir.ui.view">
+ <field name="name">res.config.settings.view.form.inherit.microsoft.calendar</field>
+ <field name="model">res.config.settings</field>
+ <field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
+ <field name="arch" type="xml">
+ <div id="msg_module_microsoft_calendar" position="replace">
+ <div class="content-group" attrs="{'invisible': [('module_microsoft_calendar','=',False)]}">
+ <div class="mt16 row">
+ <label for="cal_microsoft_client_id" string="Client ID" class="col-3 col-lg-3 o_light_label"/>
+ <field name="cal_microsoft_client_id" nolabel="1"/>
+ <label for="cal_microsoft_client_secret" string="Client Secret" class="col-3 col-lg-3 o_light_label"/>
+ <field name="cal_microsoft_client_secret" password="True" nolabel="1"/>
+ </div>
+ </div>
+ </div>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/microsoft_calendar/views/res_users_views.xml b/addons/microsoft_calendar/views/res_users_views.xml
new file mode 100644
index 00000000000..9b404dc5bfe
--- /dev/null
+++ b/addons/microsoft_calendar/views/res_users_views.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="view_users_form" model="ir.ui.view">
+ <field name="name">res.users.form</field>
+ <field name="model">res.users</field>
+ <field name="inherit_id" ref="base.view_users_form"/>
+ <field name="arch" type="xml">
+ <notebook colspan="4" position="inside">
+ <page string="Calendar" name="calendar" groups="base.group_system">
+ <group>
+ <field name="microsoft_calendar_rtoken" readonly="1"/>
+ <field name="microsoft_calendar_token" readonly="1"/>
+ <field name="microsoft_calendar_token_validity" readonly="1"/>
+ <field name="microsoft_calendar_sync_token" readonly="1"/>
+ </group>
+ <button
+ string="Reset Account" class="btn btn-secondary"
+ type="action" name="%(microsoft_calendar_reset_account_action)d"
+ context="{'default_user_id': active_id}"/>
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+</odoo>