mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
app_saas处理当clone库时,appid同时更新
This commit is contained in:
@@ -4,5 +4,4 @@
|
|||||||
from . import res_config_settings
|
from . import res_config_settings
|
||||||
from . import auth_oauth_provider
|
from . import auth_oauth_provider
|
||||||
from . import res_users
|
from . import res_users
|
||||||
|
from . import ir_config_parameter
|
||||||
|
|
||||||
|
|||||||
17
app_saas/models/ir_config_parameter.py
Normal file
17
app_saas/models/ir_config_parameter.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class IrConfigParameter(models.Model):
|
||||||
|
_inherit = 'ir.config_parameter'
|
||||||
|
|
||||||
|
def init(self, force=False):
|
||||||
|
super(IrConfigParameter, self).init(force=force)
|
||||||
|
if force:
|
||||||
|
oauth_app_saas = self.env.ref('app_saas.ir_config_parameter.py')
|
||||||
|
if not oauth_app_saas:
|
||||||
|
return
|
||||||
|
dbuuid = self.sudo().get_param('database.uuid')
|
||||||
|
oauth_app_saas.write({'client_id': dbuuid})
|
||||||
Reference in New Issue
Block a user