[IMP] auth_oauth: Convert yml data file to xml

This commit is contained in:
Yannick Tivisse
2017-11-16 14:49:05 +01:00
parent dae838c6fe
commit 2d5aefb72f
3 changed files with 8 additions and 7 deletions
-1
View File
@@ -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>
@@ -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')})