mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update customize
This commit is contained in:
@@ -71,15 +71,15 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
def set_module_url(self):
|
def set_module_url(self):
|
||||||
if not self._app_check_sys_op():
|
if not self._app_check_sys_op():
|
||||||
raise UserError(_('Not allow.'))
|
raise UserError(_('Not allow.'))
|
||||||
config_parameter = self.env['ir.config_parameter'].sudo()
|
try:
|
||||||
app_enterprise_url = config_parameter.get_param('app_enterprise_url', 'https://www.odooai.cn')
|
config_parameter = self.env['ir.config_parameter'].sudo()
|
||||||
modules = self.env['ir.module.module'].search([('license', 'like', 'OEEL%'), ('website', '!=', False)])
|
app_enterprise_url = config_parameter.get_param('app_enterprise_url', 'https://www.odooai.cn')
|
||||||
if modules:
|
modules = self.env['ir.module.module'].search([('license', 'like', 'OEEL%'), ('website', '!=', False)])
|
||||||
sql = "UPDATE ir_module_module SET website = '%s' WHERE id IN %s" % (app_enterprise_url, tuple(modules.ids))
|
if modules:
|
||||||
try:
|
sql = "UPDATE ir_module_module SET website = '%s' WHERE id IN %s" % (app_enterprise_url, tuple(modules.ids))
|
||||||
self._cr.execute(sql)
|
self._cr.execute(sql)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# 清数据,o=对象, s=序列
|
# 清数据,o=对象, s=序列
|
||||||
def _remove_app_data(self, o, s=[]):
|
def _remove_app_data(self, o, s=[]):
|
||||||
|
|||||||
Reference in New Issue
Block a user