From 6db140d5d6f4bf6b9a0772ad75ceeb5721e773f0 Mon Sep 17 00:00:00 2001 From: Rashik kalathiya Date: Wed, 22 Jul 2015 16:17:42 +0530 Subject: [PATCH] [IMP] auth_oauth: Update the tutorial 'Sign in with gmail' --- addons/auth_oauth/res_config.py | 9 ++ addons/auth_oauth/res_config.xml | 113 +++++++++++++++---- addons/auth_oauth/static/src/img/steps_1.png | Bin 0 -> 5952 bytes addons/auth_oauth/static/src/img/steps_2.png | Bin 0 -> 6467 bytes addons/auth_oauth/static/src/img/steps_3.png | Bin 0 -> 6525 bytes addons/auth_oauth/static/src/img/steps_4.png | Bin 0 -> 6096 bytes addons/auth_oauth/static/src/img/steps_5.png | Bin 0 -> 10030 bytes addons/auth_oauth/static/src/img/steps_6.png | Bin 0 -> 8058 bytes addons/auth_oauth/static/src/img/steps_7.png | Bin 0 -> 9743 bytes addons/auth_oauth/static/src/img/steps_8.png | Bin 0 -> 15309 bytes addons/auth_oauth/static/src/img/steps_9.png | Bin 0 -> 9131 bytes addons/base_setup/res_config.py | 2 +- addons/base_setup/res_config_view.xml | 6 +- 13 files changed, 108 insertions(+), 22 deletions(-) create mode 100644 addons/auth_oauth/static/src/img/steps_1.png create mode 100644 addons/auth_oauth/static/src/img/steps_2.png create mode 100644 addons/auth_oauth/static/src/img/steps_3.png create mode 100644 addons/auth_oauth/static/src/img/steps_4.png create mode 100644 addons/auth_oauth/static/src/img/steps_5.png create mode 100644 addons/auth_oauth/static/src/img/steps_6.png create mode 100644 addons/auth_oauth/static/src/img/steps_7.png create mode 100644 addons/auth_oauth/static/src/img/steps_8.png create mode 100644 addons/auth_oauth/static/src/img/steps_9.png diff --git a/addons/auth_oauth/res_config.py b/addons/auth_oauth/res_config.py index 6f05ae10f3a..c7f14ba6199 100644 --- a/addons/auth_oauth/res_config.py +++ b/addons/auth_oauth/res_config.py @@ -9,9 +9,17 @@ _logger = logging.getLogger(__name__) class base_config_settings(osv.TransientModel): _inherit = 'base.config.settings' + def get_uri(self, cr, uid, context=None): + return "%s/auth_oauth/signin" % (self.pool['ir.config_parameter'].get_param(cr, uid, 'web.base.url', context=context)) + + def _get_server_uri(self, cr, uid, ids, name, arg, context=None): + return dict.fromkeys(ids, self.get_uri(cr, uid, context)) + _columns = { 'auth_oauth_google_enabled' : fields.boolean('Allow users to sign in with Google'), 'auth_oauth_google_client_id' : fields.char('Client ID'), + 'server_uri_google': fields.function(_get_server_uri, type='char', string='Server uri'), + 'auth_oauth_tutorial_enabled': fields.boolean('Show tutorial'), } def default_get(self, cr, uid, fields, context=None): @@ -25,6 +33,7 @@ class base_config_settings(osv.TransientModel): return { 'auth_oauth_google_enabled': rg[0]['enabled'], 'auth_oauth_google_client_id': rg[0]['client_id'], + 'server_uri_google': self.get_uri(cr, uid, context) } def set_oauth_providers(self, cr, uid, ids, context=None): diff --git a/addons/auth_oauth/res_config.xml b/addons/auth_oauth/res_config.xml index 1fe1e8e1506..63f83d3ef4f 100644 --- a/addons/auth_oauth/res_config.xml +++ b/addons/auth_oauth/res_config.xml @@ -6,31 +6,106 @@ base.config.settings - -
-
+ +