mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_label: Migration to 14.0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ast import literal_eval
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import common
|
||||
|
||||
@@ -14,9 +14,14 @@ class TestReportLabel(common.TransactionCase):
|
||||
self.partner_label.create_action()
|
||||
action = self.partner_label.run()
|
||||
model = action["res_model"]
|
||||
context = literal_eval(action["context"])
|
||||
context["active_model"] = "res.partner"
|
||||
context["active_ids"] = self.env["res.partner"].search([]).ids
|
||||
context = action["context"]
|
||||
context.update(
|
||||
{
|
||||
"active_model": "res.partner",
|
||||
"active_ids": self.env["res.partner"].search([]).ids,
|
||||
"discard_logo_check": True,
|
||||
}
|
||||
)
|
||||
wizard = self.env[model].with_context(context).create({})
|
||||
report_action = wizard.print_report()
|
||||
self.assertEquals(report_action["type"], "ir.actions.report")
|
||||
|
||||
Reference in New Issue
Block a user