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',
|
'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',
|
'author': 'odooai.cn',
|
||||||
'category': 'Extra Tools',
|
'category': 'Extra Tools',
|
||||||
'website': 'https://www.odooai.cn',
|
'website': 'https://www.odooai.cn',
|
||||||
|
|||||||
@@ -68,13 +68,16 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
app_doc_root_url = fields.Char('Help of topic domain', config_parameter='app_doc_root_url', default='https://odooai.cn')
|
app_doc_root_url = fields.Char('Help of topic domain', config_parameter='app_doc_root_url', default='https://odooai.cn')
|
||||||
|
|
||||||
@api.model
|
@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()
|
config_parameter = self.env['ir.config_parameter'].sudo()
|
||||||
app_enterprise_url = config_parameter.get_param('app_enterprise_url', 'https://www.odooai.cn')
|
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%')
|
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:
|
try:
|
||||||
self._cr.execute(sql)
|
self._cr.execute(sql)
|
||||||
self._cr.commit()
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<section class="container app">
|
<section class="container app">
|
||||||
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
<div class="oe_row oe_spaced" style="max-width: 95%;">
|
||||||
<div class="row">
|
<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%;">
|
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">1. Deletes Odoo label in footer</li>
|
<li class="list-group-item">1. Deletes Odoo label in footer</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user