mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update desc odooai
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of sunpop.cn. See LICENSE file for full copyright and licensing details.
|
||||
# Part of odooai.cn. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
# Created on 2023-02-02
|
||||
# author: 欧度智能,http://www.sunpop.cn
|
||||
# author: 欧度智能,http://www.odooai.cn
|
||||
# email: 300883@qq.com
|
||||
# resource of odooai
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
# Odoo12在线用户手册(长期更新)
|
||||
# http://www.sunpop.cn/documentation/user/12.0/en/index.html
|
||||
# http://www.odooai.cn/documentation/user/12.0/en/index.html
|
||||
|
||||
# Odoo12在线开发者手册(长期更新)
|
||||
# http://www.sunpop.cn/documentation/12.0/index.html
|
||||
# http://www.odooai.cn/documentation/12.0/index.html
|
||||
|
||||
# Odoo10在线中文用户手册(长期更新)
|
||||
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
|
||||
# http://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
|
||||
|
||||
# Odoo10离线中文用户手册下载
|
||||
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
|
||||
# http://www.odooai.cn/odoo10_user_manual_document_offline/
|
||||
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
|
||||
# http://www.sunpop.cn/odoo10_developer_document_offline/
|
||||
# http://www.odooai.cn/odoo10_developer_document_offline/
|
||||
# description:
|
||||
|
||||
from . import base
|
||||
|
||||
@@ -18,7 +18,7 @@ class IrMailServer(models.Model):
|
||||
email_to = message['To']
|
||||
|
||||
# 忽略掉无效email,避免被ban
|
||||
if email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
||||
if email_to.find('example.com') != -1 or email_to.find('@odooai.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
||||
_logger.error(_("=================Email to ignore: %s") % email_to)
|
||||
raise AssertionError(_("Email to ignore: %s") % email_to)
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@ class MailMail(models.Model):
|
||||
# 猴子补丁模式,改默认发邮件逻辑
|
||||
def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
|
||||
for m in self:
|
||||
if m.email_to and (m.email_to.find('example.com') != -1 or m.email_to.find('@sunpop.cn') != -1 or m.email_to.find('@odooapp.cn') != -1):
|
||||
if m.email_to and (m.email_to.find('example.com') != -1 or m.email_to.find('@odooai.cn') != -1 or m.email_to.find('@odooapp.cn') != -1):
|
||||
self = self - m
|
||||
return super(MailMail, self)._send(auto_commit, raise_exception, smtp_session)
|
||||
|
||||
Reference in New Issue
Block a user