int app-odoo 17, paid

This commit is contained in:
Ivan Office
2023-09-30 10:58:00 +08:00
parent e346c360a2
commit 72c740dd76
355 changed files with 14784 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models, _
import logging
_logger = logging.getLogger(__name__)
class MailMail(models.Model):
_inherit = "mail.mail"
# 猴子补丁模式,改默认发邮件逻辑
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('@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)