Skip to content

Commit f25e94f

Browse files
Hardik-OSINikul-OSI
authored andcommitted
report_async: migration to 15.0
1 parent feb9f2b commit f25e94f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

report_async/data/mail_template.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<field
77
name="email_from"
88
>${object.company_id.partner_id.email_formatted|safe}</field>
9-
<field name="partner_to">${user.partner_id.id}</field>
9+
<field name="partner_to">{{ user.partner_id.id }}</field>
1010
<field name="body_html" type="html">
1111
<table
1212
border="0"

report_async/tests/test_report_async.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ def setUp(self):
1414

1515
def _print_wizard(self, res):
1616
obj = self.env[res["res_model"]]
17-
ctx = {
18-
"active_model": self.print_doc._name,
19-
"active_id": self.print_doc.id,
20-
}
21-
ctx.update(res["context"])
2217
with Form(
2318
obj.with_context(
24-
active_model=self.print_doc._name, active_id=self.print_doc.id
19+
active_model=self.print_doc._name,
20+
active_id=self.print_doc.id,
21+
async_process=res["context"].get("async_process"),
2522
)
2623
) as form:
2724
form.reference = "{},{}".format(self.test_rec._name, self.test_rec.id)
@@ -37,6 +34,7 @@ def test_1_run_now(self):
3734

3835
def test_2_run_async(self):
3936
"""Run background will return nothing, job started"""
37+
self.print_doc.write({"allow_async": False})
4038
with self.assertRaises(UserError):
4139
self.print_doc.run_async()
4240
self.print_doc.write({"allow_async": True, "email_notify": True})

0 commit comments

Comments
 (0)