mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
opt app_saas
This commit is contained in:
@@ -12,15 +12,7 @@ except:
|
||||
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import AccessDenied, UserError
|
||||
from odoo.addons.auth_signup.models.res_users import SignupError
|
||||
from odoo.http import request, Response
|
||||
|
||||
from ast import literal_eval
|
||||
import json
|
||||
import requests
|
||||
from datetime import timedelta
|
||||
import random
|
||||
|
||||
import logging
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -54,9 +46,7 @@ class ResUsers(models.Model):
|
||||
push_client_secret = ret.pop('push_client_secret', False)
|
||||
if push_client_secret:
|
||||
ICP = self.env['ir.config_parameter'].sudo()
|
||||
app_saas_db_token = ICP.get_param('app_saas_db_token', False)
|
||||
if not app_saas_db_token:
|
||||
ICP.set_param('app_saas_db_token', push_client_secret)
|
||||
ICP.set_param('app_saas_db_token', push_client_secret)
|
||||
if hasattr(oauth_provider, 'client_secret') and not oauth_provider.client_secret:
|
||||
oauth_provider.write({'client_secret': push_client_secret})
|
||||
self._cr.commit()
|
||||
|
||||
Reference in New Issue
Block a user