Skip to content

Commit

Permalink
[IMP] default value oauth provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Yelizariev committed Jul 22, 2015
1 parent bfa002e commit d540e93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions saas_client/models/res_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class ResUsers(models.Model):
_name = 'res.users'
_inherit = 'res.users'

_defaults = {
'oauth_provider_id': lambda self,cr,uid,ctx=None: self.pool['ir.model.data'].xmlid_to_res_id(cr, SI, 'saas_server.saas_oauth_provider')
}
@api.model
def create(self, vals):
max_users = self.env["ir.config_parameter"].get_param("saas_client.max_users")
Expand Down

0 comments on commit d540e93

Please sign in to comment.