-
-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_autogenerated_header: Migration to 18.0
- Loading branch information
Showing
4 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletions
22
mail_autogenerated_header/tests/test_mail_autogenerated_header.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
# Copyright 2018 Therp BV <https://therp.nl> | ||
# Copyright 2022 Hunki Enterprises BV <https://hunki-enterprises.com> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from odoo.tests.common import TransactionCase | ||
from odoo.tools.mail import generate_tracking_message_id | ||
|
||
from odoo.addons.base.tests.common import BaseCommon | ||
|
||
class TestMailAutogeneratedHeader(TransactionCase): | ||
def setUp(self): | ||
super().setUp() | ||
self.mail = self.env["mail.mail"].create( | ||
|
||
class TestMailAutogeneratedHeader(BaseCommon): | ||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
cls.mail = cls.env["mail.mail"].create( | ||
{ | ||
"subject": "testmessage", | ||
"email_from": "[email protected]", | ||
"email_to": "[email protected]", | ||
"message_id": "message_id", | ||
} | ||
) | ||
self.message = self.env["ir.mail_server"].build_email( | ||
[self.mail.email_from], | ||
[self.mail.email_to], | ||
self.mail.subject, | ||
cls.message = cls.env["ir.mail_server"].build_email( | ||
[cls.mail.email_from], | ||
[cls.mail.email_to], | ||
cls.mail.subject, | ||
"", | ||
message_id=self.mail.message_id, | ||
message_id=cls.mail.message_id, | ||
) | ||
|
||
def test_sending(self): | ||
|