[MIG] sql_export_mail: Migration to 17.0

This commit is contained in:
Sander Lienaerts
2024-01-15 16:49:34 +01:00
parent bf36f502c1
commit 63bf5925fa
9 changed files with 13 additions and 40 deletions

View File

@@ -2,15 +2,16 @@
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID
from odoo import SUPERUSER_ID, Command
from odoo.tests.common import TransactionCase
class TestExportSqlQueryMail(TransactionCase):
def setUp(self):
super(TestExportSqlQueryMail, self).setUp()
self.sql_report_demo = self.env.ref("sql_export.sql_export_partner")
self.sql_report_demo.write({"mail_user_ids": [(4, SUPERUSER_ID)]})
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.sql_report_demo = cls.env.ref("sql_export.sql_export_partner")
cls.sql_report_demo.mail_user_ids = [Command.link(SUPERUSER_ID)]
def test_sql_query_mail(self):
mail_obj = self.env["mail.mail"]