commit
0949b955cd
@ -43,6 +43,6 @@ class MailMessage(models.Model):
|
|||||||
"is_quoted_reply": True,
|
"is_quoted_reply": True,
|
||||||
"default_notify": True,
|
"default_notify": True,
|
||||||
"force_email": True,
|
"force_email": True,
|
||||||
"default_partner_ids": [(6, 0, self.partner_ids.ids)],
|
"default_partner_ids": self.partner_ids.ids,
|
||||||
}
|
}
|
||||||
return action
|
return action
|
||||||
|
@ -13,7 +13,11 @@ class TestMessageReply(TransactionCase):
|
|||||||
partner.message_ids.filtered(lambda r: r.message_type != "notification")
|
partner.message_ids.filtered(lambda r: r.message_type != "notification")
|
||||||
)
|
)
|
||||||
# pylint: disable=C8107
|
# pylint: disable=C8107
|
||||||
message = partner.message_post(body="demo message", message_type="email")
|
message = partner.message_post(
|
||||||
|
body="demo message",
|
||||||
|
message_type="email",
|
||||||
|
partner_ids=self.env.ref("base.partner_demo").ids,
|
||||||
|
)
|
||||||
partner.refresh()
|
partner.refresh()
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
message,
|
message,
|
||||||
@ -28,6 +32,8 @@ class TestMessageReply(TransactionCase):
|
|||||||
wizard = (
|
wizard = (
|
||||||
self.env[action["res_model"]].with_context(**action["context"]).create({})
|
self.env[action["res_model"]].with_context(**action["context"]).create({})
|
||||||
)
|
)
|
||||||
|
self.assertTrue(wizard.partner_ids)
|
||||||
|
self.assertEqual(message.partner_ids, wizard.partner_ids)
|
||||||
# the onchange in the composer isn't triggered in tests, so we check for the
|
# the onchange in the composer isn't triggered in tests, so we check for the
|
||||||
# correct quote in the context
|
# correct quote in the context
|
||||||
email_quote = re.search("<p>.*?</p>", wizard._context["quote_body"]).group()
|
email_quote = re.search("<p>.*?</p>", wizard._context["quote_body"]).group()
|
||||||
|
Loading…
Reference in New Issue
Block a user