File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ def test_unquoted_reply(self):
7171 wizard = (
7272 self .env [action ["res_model" ]].with_context (** action ["context" ]).create ({})
7373 )
74+ wizard = wizard .with_context (
75+ default_subject = "Some subject for testing purposes"
76+ )
7477 self .assertTrue (wizard .partner_ids )
7578 self .assertEqual (message .email_from , wizard .partner_ids .email_formatted )
7679 # the onchange in the composer isn't triggered in tests, so we check for the
Original file line number Diff line number Diff line change 11from markupsafe import Markup
22
3- from odoo import api , models , tools
3+ from odoo import api , models
44
55
66class MailComposeMessage (models .TransientModel ):
@@ -31,7 +31,8 @@ def _compute_body(self):
3131 def _compute_subject (self ):
3232 res = super ()._compute_subject ()
3333 for composer in self :
34- subj = composer .env .context .get ("default_subject" , False )
34+ context = composer .env .context
35+ subj = context .get ("default_subject" , False )
3536 if subj :
36- composer .subject = tools . ustr (subj )
37+ composer .subject = str (subj )
3738 return res
You can’t perform that action at this time.
0 commit comments