diff options
| author | Akash Bhavsar <abh@odoo.com> | 2016-12-01 17:13:47 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-01-03 17:07:02 +0100 |
| commit | 79fd51b2a59224e8fa189f01c53d778e06774c59 (patch) | |
| tree | fc9b220edc5368cfb70ff7fd457e51fb6b7fa158 /addons/auth_oauth | |
| parent | 80c46ee4fc273f59823821dcdc98bcc6b7fdeeaf (diff) | |
[IMP] base_setup: Improve the `General Settings` form view
Diffstat (limited to 'addons/auth_oauth')
| -rw-r--r-- | addons/auth_oauth/models/res_config.py | 1 | ||||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_1.png | bin | 5952 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_2.png | bin | 6467 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_3.png | bin | 6525 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_4.png | bin | 6096 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_5.png | bin | 10030 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_6.png | bin | 8058 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_7.png | bin | 9743 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_8.png | bin | 15309 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/static/src/img/steps_9.png | bin | 9131 -> 0 bytes | |||
| -rw-r--r-- | addons/auth_oauth/views/res_config_views.xml | 118 |
11 files changed, 23 insertions, 96 deletions
diff --git a/addons/auth_oauth/models/res_config.py b/addons/auth_oauth/models/res_config.py index 2fb55d5ab09..39c72880a38 100644 --- a/addons/auth_oauth/models/res_config.py +++ b/addons/auth_oauth/models/res_config.py @@ -23,7 +23,6 @@ class BaseConfigSettings(models.TransientModel): auth_oauth_google_enabled = fields.Boolean(string='Allow users to sign in with Google') auth_oauth_google_client_id = fields.Char(string='Client ID') server_uri_google = fields.Char(compute='_compute_server_uri', string='Server uri') - auth_oauth_tutorial_enabled = fields.Boolean(string='Show tutorial') @api.model def default_get(self, fields): diff --git a/addons/auth_oauth/static/src/img/steps_1.png b/addons/auth_oauth/static/src/img/steps_1.png Binary files differdeleted file mode 100644 index e566bd57e21..00000000000 --- a/addons/auth_oauth/static/src/img/steps_1.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_2.png b/addons/auth_oauth/static/src/img/steps_2.png Binary files differdeleted file mode 100644 index d8efa8a9069..00000000000 --- a/addons/auth_oauth/static/src/img/steps_2.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_3.png b/addons/auth_oauth/static/src/img/steps_3.png Binary files differdeleted file mode 100644 index e22da632c70..00000000000 --- a/addons/auth_oauth/static/src/img/steps_3.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_4.png b/addons/auth_oauth/static/src/img/steps_4.png Binary files differdeleted file mode 100644 index 9b53656af8b..00000000000 --- a/addons/auth_oauth/static/src/img/steps_4.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_5.png b/addons/auth_oauth/static/src/img/steps_5.png Binary files differdeleted file mode 100644 index 86010d2c13d..00000000000 --- a/addons/auth_oauth/static/src/img/steps_5.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_6.png b/addons/auth_oauth/static/src/img/steps_6.png Binary files differdeleted file mode 100644 index bf9aecb5adc..00000000000 --- a/addons/auth_oauth/static/src/img/steps_6.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_7.png b/addons/auth_oauth/static/src/img/steps_7.png Binary files differdeleted file mode 100644 index 064b81a97d8..00000000000 --- a/addons/auth_oauth/static/src/img/steps_7.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_8.png b/addons/auth_oauth/static/src/img/steps_8.png Binary files differdeleted file mode 100644 index b1ec01739fa..00000000000 --- a/addons/auth_oauth/static/src/img/steps_8.png +++ /dev/null diff --git a/addons/auth_oauth/static/src/img/steps_9.png b/addons/auth_oauth/static/src/img/steps_9.png Binary files differdeleted file mode 100644 index 72053a474ab..00000000000 --- a/addons/auth_oauth/static/src/img/steps_9.png +++ /dev/null diff --git a/addons/auth_oauth/views/res_config_views.xml b/addons/auth_oauth/views/res_config_views.xml index 6b48bcb21ae..4f0912afa18 100644 --- a/addons/auth_oauth/views/res_config_views.xml +++ b/addons/auth_oauth/views/res_config_views.xml @@ -1,109 +1,37 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> - <record id="view_general_configuration" model="ir.ui.view"> - <field name="name">base.config.settings.form.inherit</field> + <record id="base_config_settings_view_form_inherit_auth_oauth" model="ir.ui.view"> + <field name="name">base.config.settings.form.inherit.oauth</field> <field name="model">base.config.settings</field> - <field name="inherit_id" ref="base_setup.view_general_configuration"/> + <field name="inherit_id" ref="base_setup.base_config_settings_view_form"/> <field name="arch" type="xml"> - <xpath expr="//group[@name='google']/label" position="before"> - <label for="id" string="Authentication" attrs="{'invisible':[('module_auth_oauth','=',False)]}"/> - <div attrs="{'invisible':[('module_auth_oauth','=',False)]}"> - <div name="google" id="top"> - <div> + <div id="msg_module_auth_oauth" position="replace"> + <div class="content-group"> + <div class="mt16"> + <button type="action" name="%(auth_oauth.action_oauth_provider)d" string="OAuth Providers" icon="fa-arrow-right" class="btn-link"/> + </div> + </div> + </div> + <div id="module_auth_oauth" position="after"> + <div class="col-xs-12 col-md-6 o_setting_box"> + <div class="o_setting_left_pane"> <field name="auth_oauth_google_enabled"/> - <label for="auth_oauth_google_enabled" string="Allow users to sign in with Google"/> </div> - <div attrs="{'invisible':[('auth_oauth_google_enabled','=',False)]}"> - <div> - <label for="auth_oauth_tutorial_enabled" string="Show Tutorial"/> - <field name="auth_oauth_tutorial_enabled"/> - </div> - <div attrs="{'invisible':[('auth_oauth_tutorial_enabled','=',False)]}"> - <h2> - To setup the sign in process with Google, you have to perform - the following steps first. - </h2> - <ol> - <li> - Connect to your Google account and go to - <a href="https://console.developers.google.com/"> - https://console.developers.google.com/</a> - </li> - <li> - Click on <b>Create Project</b> and enter the project name and - other details. - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_1.png'/> - </div> - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_2.png'/> - </div> - </li> - <li> - Click on <b>Use Google APIs</b> - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_3.png'/> - </div> - </li> - <li> - On the left side menu, select the sub menu <b>Credentials</b> - (from <b>API Manager</b>) then select <b>OAuth consent screen</b>. - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_4.png'/> - </div> - </li> - <li> - Fill in your address, email and the product name (for example odoo) - and then save. - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_5.png'/> - </div> - </li> - <li> - Then click on <b>Add Credentials</b> and select the second option - (OAuth 2.0 Client ID). - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_6.png'/> - </div> - <div class="mb8"> - <img class="mt8" src='/auth_oauth/static/src/img/steps_7.png'/> - </div> - </li> - <li> - Check that the application type is set on <b>Web Application</b>. - Now configure the allowed pages on which you will be redirected. - </li> - <li> - To achieve this, complete the field <b>Authorized redirect URIs</b>. - Copy paste the following link in the box<b>: - <field name="server_uri_google"/></b> - <div class="clearfix"></div>Then click on <b>Create</b>. - <div class="mb8"> - <img class="mt8" src='/auth_oauth/static/src/img/steps_8.png'/> - </div> - </li> - <li> - Once done, you receive two information (your <b>Client ID</b> and <b> - Client Secret</b>). You have to insert your <b>Client ID</b> in - the field below. - <div class="mb8"> - <img src='/auth_oauth/static/src/img/steps_9.png'/> - </div> - </li> - <div> - <a onclick="document.getElementById('top').scrollIntoView();"> - Return to Top</a> - </div> - </ol> + <div class="o_setting_right_pane"> + <label string="Google Authentification" for="auth_oauth_google_enabled"/> + <div class="text-muted"> + Allow users to sign in with their Google account </div> - <div class="o_row"> - <label for="auth_oauth_google_client_id" string="Google Client ID:"/> - <field name="auth_oauth_google_client_id" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/> + <div class="content-group" attrs="{'invisible': [('auth_oauth_google_enabled','=',False)]}"> + <div class="row mt16"> + <label for="auth_oauth_google_client_id" string="Client ID:" class="col-md-3 o_light_label"/> + <field name="auth_oauth_google_client_id" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/> + </div> + <a href="https://www.odoo.com/documentation/user/online/general/auth/google.html" target="_blank" class="oe_link"><i class="fa fa-fw fa-arrow-right"/>Tutorial</a> </div> </div> </div> </div> - </xpath> </field> </record> </odoo> |
