Skip to content
Snippets Groups Projects
Commit 2d5aefb7 authored by Yannick Tivisse's avatar Yannick Tivisse
Browse files

[IMP] auth_oauth: Convert yml data file to xml

parent dae838c6
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......
......@@ -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>
-
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')})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment