update desc odooai

This commit is contained in:
ivan deng
2023-07-16 01:43:05 +08:00
parent 9a5142211d
commit 97b43df2ea
78 changed files with 272 additions and 272 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)