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.

26 lines
1020 B

  1. # Copyright 2017 Therp BV <https://therp.nl>
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests.common import TransactionCase
  4. class TestPartnerLabel(TransactionCase):
  5. def test_partner_label(self):
  6. settings = self.env["res.config.settings"].create({})
  7. settings.refresh()
  8. self.assertItemsEqual(
  9. settings.action_partner_labels_preview()["context"]["report_action"][
  10. "context"
  11. ]["active_ids"],
  12. self.env["res.partner"].search([], limit=100).ids,
  13. )
  14. self.assertEqual(
  15. settings.partner_labels_paperformat_id,
  16. self.env.ref("partner_label.report_res_partner_label").paperformat_id,
  17. )
  18. settings.partner_labels_paperformat_id = (
  19. self.env.ref("base.paperformat_us").id,
  20. )
  21. self.assertEqual(
  22. self.env.ref("partner_label.report_res_partner_label").paperformat_id,
  23. self.env.ref("base.paperformat_us"),
  24. )