mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I8K4SS [app_odoo_customize] 修复获取ir.config_parameter的权限问题,以便论坛门户用户使用
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.23.10.17',
|
||||
'version': '16.23.11.28',
|
||||
'author': 'odooai.cn',
|
||||
'category': 'Extra Tools',
|
||||
'website': 'https://www.odooai.cn',
|
||||
|
||||
@@ -9,7 +9,7 @@ class MailThread(models.AbstractModel):
|
||||
|
||||
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None):
|
||||
""" 停用订阅功能. """
|
||||
ir_config = self.env['ir.config_parameter']
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe', False) == "True" else False
|
||||
if app_stop_subscribe:
|
||||
return True
|
||||
@@ -18,7 +18,7 @@ class MailThread(models.AbstractModel):
|
||||
|
||||
def _message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, customer_ids=None):
|
||||
""" 停用订阅功能. """
|
||||
ir_config = self.env['ir.config_parameter']
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe', False) == "True" else False
|
||||
if app_stop_subscribe:
|
||||
return True
|
||||
@@ -27,7 +27,7 @@ class MailThread(models.AbstractModel):
|
||||
|
||||
def _message_auto_subscribe_followers(self, updated_values, default_subtype_ids):
|
||||
""" 停用订阅功能. """
|
||||
ir_config = self.env['ir.config_parameter']
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe', False) == "True" else False
|
||||
if app_stop_subscribe:
|
||||
return []
|
||||
@@ -36,7 +36,7 @@ class MailThread(models.AbstractModel):
|
||||
|
||||
def _message_auto_subscribe_notify(self, partner_ids, template):
|
||||
""" 停用订阅功能. """
|
||||
ir_config = self.env['ir.config_parameter']
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe', False) == "True" else False
|
||||
if app_stop_subscribe:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user