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

  1. # Copyright 2019 ACSONE SA/NV
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo.tests.common import TransactionCase
  4. class TestResPartnerIndustry(TransactionCase):
  5. def setUp(self):
  6. super(TestResPartnerIndustry, self).setUp()
  7. self.industry_1 = self.env.ref('base.res_partner_industry_O')
  8. self.industry_2 = self.env.ref('base.res_partner_industry_P')
  9. self.industry_3 = self.env.ref('base.res_partner_industry_Q')
  10. def test_res_partner_industry_complete_name(self):
  11. self.assertEqual(
  12. self.industry_1.complete_name, 'Public Administration'
  13. )
  14. self.industry_1.parent_id = self.industry_2
  15. self.assertEqual(
  16. self.industry_1.complete_name, 'Education / Public Administration'
  17. )
  18. self.industry_2.parent_id = self.industry_3
  19. self.assertEqual(
  20. self.industry_1.complete_name,
  21. 'Health/Social / Education / Public Administration',
  22. )