mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
17 lines
588 B
Python
17 lines
588 B
Python
# -*- 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)])
|