mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add saas login
This commit is contained in:
16
app_saas/models/auth_oauth_provider.py
Normal file
16
app_saas/models/auth_oauth_provider.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, modules, tools, _
|
||||
|
||||
import base64
|
||||
from datetime import timedelta
|
||||
|
||||
class AuthOAuthProvider(models.Model):
|
||||
|
||||
_inherit = 'auth.oauth.provider'
|
||||
_order = 'sequence, name'
|
||||
|
||||
# 取code的url,主要针对国内的先取code,再拿Token的方式
|
||||
code_endpoint = fields.Char(string='Token by Code Endpoint', help='Get Token from Code. Only for Code response type.')
|
||||
user_template_id = fields.Many2one('res.users', string='New User Template',
|
||||
domain=[('active', '=', False)])
|
||||
Reference in New Issue
Block a user