OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
778 B

  1. from odoo.tests import common
  2. from ast import literal_eval
  3. class TestReportLabel(common.TransactionCase):
  4. def setUp(self):
  5. super().setUp()
  6. self.partner_label = self.env.ref(
  7. "report_label.actions_server_label_partner_address")
  8. def test_01_print_partner_label(self):
  9. self.partner_label.create_action()
  10. action = self.partner_label.run()
  11. model = action["res_model"]
  12. context = literal_eval(action["context"])
  13. context["active_model"] = "res.partner"
  14. context["active_ids"] = self.env["res.partner"].search([]).ids
  15. wizard = self.env[model].with_context(context).create({})
  16. report_action = wizard.print_report()
  17. self.assertEquals(report_action["type"], "ir.actions.report")