mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
[FIX] app_odoo_customize: opt set_module_url
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
{
|
||||
'name': 'odoo17 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data',
|
||||
'version': '16.24.03.06',
|
||||
'version': '16.24.03.08',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra Tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
|
||||
@@ -68,15 +68,18 @@ class ResConfigSettings(models.TransientModel):
|
||||
app_doc_root_url = fields.Char('Help of topic domain', config_parameter='app_doc_root_url', default='https://odooai.cn')
|
||||
|
||||
@api.model
|
||||
def set_module_url(self, rec=None):
|
||||
def set_module_url(self):
|
||||
if not self._app_check_sys_op():
|
||||
raise UserError(_('Not allow.'))
|
||||
config_parameter = self.env['ir.config_parameter'].sudo()
|
||||
app_enterprise_url = config_parameter.get_param('app_enterprise_url', 'https://www.odooai.cn')
|
||||
sql = "UPDATE ir_module_module SET website = '%s' WHERE license like '%s' and website <> ''" % (app_enterprise_url, 'OEEL%')
|
||||
try:
|
||||
self._cr.execute(sql)
|
||||
self._cr.commit()
|
||||
except Exception as e:
|
||||
pass
|
||||
modules = self.env['ir.module.module'].search([('license', 'like', 'OEEL%'), ('website', '!=', False)])
|
||||
if modules:
|
||||
sql = "UPDATE ir_module_module SET website = '%s' WHERE id IN %s" % (app_enterprise_url, tuple(modules.ids))
|
||||
try:
|
||||
self._cr.execute(sql)
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
# 清数据,o=对象, s=序列
|
||||
def remove_app_data(self, o, s=[]):
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<section class="container app">
|
||||
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
||||
<div class="row">
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v16.24.02.28</h2>
|
||||
<h2 class="oe_slogan">This is a Long Term Support Apps.Update: v16.24.03.08</h2>
|
||||
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">1. Deletes Odoo label in footer</li>
|
||||
|
||||
Reference in New Issue
Block a user