diff options
| author | Yannick Tivisse <yti@odoo.com> | 2017-11-09 10:28:34 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-11-16 14:49:05 +0100 |
| commit | 2d5aefb72f2541e150070ab7623f092fb54c7fed (patch) | |
| tree | e1f909d114a5efa5b9dbba3a401efabb6c0bb6c3 /addons/auth_oauth | |
| parent | dae838c6fe3da6d0262ef5ef67b7621fec7f9e8b (diff) | |
[IMP] auth_oauth: Convert yml data file to xml
Diffstat (limited to 'addons/auth_oauth')
| -rw-r--r-- | addons/auth_oauth/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/auth_oauth/data/auth_oauth_data.xml | 8 | ||||
| -rw-r--r-- | addons/auth_oauth/data/auth_oauth_data.yml | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/addons/auth_oauth/__manifest__.py b/addons/auth_oauth/__manifest__.py index c78134cb078..4f63d517262 100644 --- a/addons/auth_oauth/__manifest__.py +++ b/addons/auth_oauth/__manifest__.py @@ -12,7 +12,6 @@ Allow users to login through OAuth2 Provider. 'depends': ['base', 'web', 'base_setup', 'auth_signup'], 'data': [ 'data/auth_oauth_data.xml', - 'data/auth_oauth_data.yml', 'views/auth_oauth_views.xml', 'views/res_users_views.xml', 'views/res_config_settings_views.xml', diff --git a/addons/auth_oauth/data/auth_oauth_data.xml b/addons/auth_oauth/data/auth_oauth_data.xml index 1b1ff532ae4..e2d061611f5 100644 --- a/addons/auth_oauth/data/auth_oauth_data.xml +++ b/addons/auth_oauth/data/auth_oauth_data.xml @@ -29,5 +29,13 @@ <field name="css_class">fa fa-google-plus-square</field> <field name="body">Log in with Google</field> </record> + + <!-- Use database uuid as client_id for OpenERP oauth provider --> + <function model="auth.oauth.provider" name="write"> + <value eval="[ref('auth_oauth.provider_openerp')]"/> + <value model="ir.config_parameter" eval="{ + 'client_id': obj().env['ir.config_parameter'].get_param('database.uuid'), + }"/> + </function> </data> </odoo> diff --git a/addons/auth_oauth/data/auth_oauth_data.yml b/addons/auth_oauth/data/auth_oauth_data.yml deleted file mode 100644 index 5ec3a53009b..00000000000 --- a/addons/auth_oauth/data/auth_oauth_data.yml +++ /dev/null @@ -1,6 +0,0 @@ -- - Use database uuid as client_id for OpenERP oauth provider -- - !python {model: ir.config_parameter, id: False}: | - oauth = self.env['auth.oauth.provider'] - oauth.browse(ref('provider_openerp')).write({'client_id': self.get_param('database.uuid')}) |
