mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
pos debrand
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Odoo Customize(Debranding, My Odoo)',
|
'name': 'Odoo Customize(Debranding, My Odoo)',
|
||||||
'version': '13.19.09.14',
|
'version': '12.19.12.02',
|
||||||
'author': 'Sunpop.cn',
|
'author': 'Sunpop.cn',
|
||||||
'category': 'Productivity',
|
'category': 'Productivity',
|
||||||
'website': 'https://www.sunpop.cn',
|
'website': 'https://www.sunpop.cn',
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright 2017 Jarvis (www.odoomod.com)
|
|
||||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
from odoo import api, fields, models, _
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright 2017 Jarvis (www.odoomod.com)
|
|
||||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||||
|
|
||||||
from odoo import api, fields, models, _
|
from odoo import api, fields, models, _
|
||||||
@@ -8,32 +7,38 @@ from odoo import api, fields, models, _
|
|||||||
class MailThread(models.AbstractModel):
|
class MailThread(models.AbstractModel):
|
||||||
_inherit = "mail.thread"
|
_inherit = "mail.thread"
|
||||||
|
|
||||||
@api.multi
|
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None):
|
||||||
def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True):
|
|
||||||
""" 停用订阅功能. """
|
""" 停用订阅功能. """
|
||||||
ir_config = self.env['ir.config_parameter']
|
ir_config = self.env['ir.config_parameter']
|
||||||
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
||||||
if app_stop_subscribe:
|
if app_stop_subscribe:
|
||||||
return
|
return True
|
||||||
else:
|
else:
|
||||||
return super(MailThread, self).message_subscribe(partner_ids, channel_ids, subtype_ids, force)
|
return super(MailThread, self).message_subscribe(partner_ids, channel_ids, subtype_ids)
|
||||||
|
|
||||||
@api.multi
|
def _message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, customer_ids=None):
|
||||||
def message_auto_subscribe(self, updated_fields, values=None):
|
|
||||||
""" 停用订阅功能. """
|
""" 停用订阅功能. """
|
||||||
ir_config = self.env['ir.config_parameter']
|
ir_config = self.env['ir.config_parameter']
|
||||||
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
||||||
if app_stop_subscribe:
|
if app_stop_subscribe:
|
||||||
return
|
return True
|
||||||
else:
|
else:
|
||||||
return super(MailThread, self).message_auto_subscribe(updated_fields, values)
|
return super(MailThread, self)._message_subscribe(partner_ids, channel_ids, subtype_ids, customer_ids)
|
||||||
|
|
||||||
@api.multi
|
def _message_auto_subscribe_followers(self, updated_values, default_subtype_ids):
|
||||||
def _message_auto_subscribe_notify(self, partner_ids):
|
|
||||||
""" 停用订阅功能. """
|
""" 停用订阅功能. """
|
||||||
ir_config = self.env['ir.config_parameter']
|
ir_config = self.env['ir.config_parameter']
|
||||||
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
||||||
if app_stop_subscribe:
|
if app_stop_subscribe:
|
||||||
return
|
return True
|
||||||
else:
|
else:
|
||||||
return super(MailThread, self)._message_auto_subscribe_notify(partner_ids)
|
return super(MailThread, self)._message_auto_subscribe_followers(updated_values, default_subtype_ids)
|
||||||
|
|
||||||
|
def _message_auto_subscribe_notify(self, partner_ids, template):
|
||||||
|
""" 停用订阅功能. """
|
||||||
|
ir_config = self.env['ir.config_parameter']
|
||||||
|
app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False
|
||||||
|
if app_stop_subscribe:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return super(MailThread, self)._message_auto_subscribe_notify( partner_ids, template)
|
||||||
|
|||||||
Reference in New Issue
Block a user