Files
app-odoo/app_saas/models/auth_oauth_provider.py
2024-12-06 21:36:30 +08:00

17 lines
588 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- 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)])