1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="calendar_config_settings" model="ir.ui.view">
6 <field name="name">Calendar settings</field>
7 <field name="model">calendar.config.settings</field>
8 <field name="arch" type="xml">
9 <form string="Configure your Gmail" version="7.0" class="oe_form_configuration">
11 <button string="Apply" type="object" name="execute" class="oe_highlight"/>
13 <button string="Cancel" type="object" name="cancel" class="oe_link"/>
15 <separator string="Google synchronization Settings"/>
18 <label for="google_cal_sync"/>
19 <field name="google_cal_sync" class="oe_inline"/>
21 <div attrs="{'invisible':[('google_cal_sync','=',False)]}">
22 <br/><h2>To setup the signin process with Google, first you have to perform the following steps</h2>
24 <li> Connect on your google account and go to <a href='https://cloud.google.com/console' target='_blank'>https://cloud.google.com/console</a> </li>
26 Click on <b>"Create Project"</b> and enter a project name and change your id if you want. Don't forget to accept the Terms of Services
27 <br/><img src='/google_calendar/static/src/img/setup_01.png' class='calendar_img_tuto'/>
28 <br/><img src='/google_calendar/static/src/img/setup_02.png' class='calendar_img_tuto'/>
30 <li> In the menu on left side, select the sub menu APIs (from menu APIs and auth) and activate <b>"Calendar API"</b> by clicking on button "OFF".
31 <br/> You will need to accept again the "Google APIs Terms of services" and "Calendar API Terms of service"
32 <br/> When it's done, check that the button of <b>"Calendar API"</b> is well in green and with text "ON"
33 <br/> <img src='/google_calendar/static/src/img/setup_03.png' class='calendar_img_tuto'/>
34 <br/> <img src='/google_calendar/static/src/img/setup_04.png' class='calendar_img_tuto'/>
35 <br/> <img src='/google_calendar/static/src/img/setup_05.png' class='calendar_img_tuto'/>
38 In the menu on left side, select the sub menu <b>'Registered apps'</b> (from menu APIs and auth) and click on button "Register APP".
39 <br/> Fill in the Name of application and check that the platform is well on <b>'Web Application'</b> before to click on <b>'Register"</b>
40 <br/> <img src='/google_calendar/static/src/img/setup_06.png' class='calendar_img_tuto'/>
41 <br/> <img src='/google_calendar/static/src/img/setup_07.png' class='calendar_img_tuto'/>
44 Now, you can click on <b>"OAuth 2.0 Client ID"</b> and see your <u><i>Client ID</i></u> and your <u><i>Client Secret</i></u>.
45 <br/> You should now configure the allowed pages on which you will be redirected. To do it, you need to complete de field <b>"Redirect RI"</b>
46 and set as value your own domain followed by <i>"/googleauth/oauth2callback"</i>. (Eg: http://127.0.0.1:8069/googleauth/oauth2callback)
48 <br/><img src='/google_calendar/static/src/img/setup_09.png' class='calendar_img_tuto'/>
50 <li>One the uri allowed, you need to regenerate your private token by clicking on "Generate".
51 <br/>Once done, you will have the both informations that you need to insert in the 2 fields below !
52 <br/> <img src='/google_calendar/static/src/img/setup_08.png' class='calendar_img_tuto'/>
55 Remark : You can, if you want, personalize the consent screen that your users will see by clicking on "update" below <b>"Consent Screen"</b>.
56 <br/> <img src='/google_calendar/static/src/img/setup_10.png' class='calendar_img_tuto'/>
64 <div class="calendar_settings">
65 <label for="cal_client_id" string="Google Client ID" />
66 <field name="cal_client_id" class="oe_inline" />
71 <label for="cal_client_secret" string="Google Client Secret"/>
72 <field name="cal_client_secret" class="oe_inline" password="True"/>
80 <record id="action_config_settings_google_calendar" model="ir.actions.act_window">
81 <field name="name">Synchronization</field>
82 <field name="type">ir.actions.act_window</field>
83 <field name="res_model">calendar.config.settings</field>
84 <field name="view_mode">form</field>
85 <field name="target">inline</field>
88 <menuitem id="menu_calendar_config_settings" parent="base_calendar.menu_calendar_configuration" action="action_config_settings_google_calendar" groups="base.group_no_one"/>