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
987 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 Therp BV <http://therp.nl>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp.tests.common import TransactionCase
  5. class TestPartnerLabel(TransactionCase):
  6. def test_partner_label(self):
  7. settings = self.env['base.config.settings'].create({})
  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. 'report.paperformat_us'
  19. ).id,
  20. self.assertEqual(
  21. self.env.ref('partner_label.report_res_partner_label')
  22. .paperformat_id,
  23. self.env.ref('report.paperformat_us')
  24. )