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
984 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']['active_ids'],
  10. self.env['res.partner'].search([], limit=100).ids,
  11. )
  12. self.assertEqual(
  13. settings.partner_labels_paperformat_id,
  14. self.env.ref('partner_label.report_res_partner_label')
  15. .paperformat_id
  16. )
  17. settings.partner_labels_paperformat_id = self.env.ref(
  18. 'base.paperformat_us'
  19. ).id,
  20. self.assertEqual(
  21. self.env.ref('partner_label.report_res_partner_label')
  22. .paperformat_id,
  23. self.env.ref('base.paperformat_us')
  24. )