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.

50 lines
2.2 KiB

  1. # Copyright 2014-2018 Therp BV <https://therp.nl>.
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests import common
  4. class TestCommon(common.SingleTransactionCase):
  5. # pylint: disable=too-many-instance-attributes
  6. post_install = True
  7. def setUp(self):
  8. """Create common objects for tab tests."""
  9. # pylint: disable=invalid-name
  10. super(TestCommon, self).setUp()
  11. self.tab_model = self.env['res.partner.tab']
  12. self.type_model = self.env['res.partner.relation.type']
  13. self.partner_model = self.env['res.partner']
  14. self.relation_model = self.env['res.partner.relation']
  15. # Categories.
  16. self.category_government = self.env.ref(
  17. 'partner_multi_relation_tabs.category_government')
  18. self.category_functionary = self.env.ref(
  19. 'partner_multi_relation_tabs.category_functionary')
  20. self.category_department = self.env.ref(
  21. 'partner_multi_relation_tabs.category_department')
  22. # Tabs.
  23. self.tab_committee = self.env.ref(
  24. 'partner_multi_relation_tabs.tab_committee')
  25. self.tab_board = self.env.ref(
  26. 'partner_multi_relation_tabs.tab_board')
  27. self.tab_positions = self.env.ref(
  28. 'partner_multi_relation_tabs.tab_positions')
  29. self.tab_departments = self.env.ref(
  30. 'partner_multi_relation_tabs.tab_departments')
  31. # Types.
  32. self.type_chairperson = self.env.ref(
  33. 'partner_multi_relation_tabs'
  34. '.relation_type_committee_has_chairperson')
  35. self.type_ceo = self.env.ref(
  36. 'partner_multi_relation_tabs'
  37. '.relation_type_company_has_ceo')
  38. # Partners.
  39. self.partner_big_company = self.env.ref(
  40. 'partner_multi_relation_tabs.partner_big_company')
  41. self.partner_important_person = self.env.ref(
  42. 'partner_multi_relation_tabs.partner_important_person')
  43. self.partner_common_person = self.env.ref(
  44. 'partner_multi_relation_tabs.partner_common_person')
  45. # Relations.
  46. self.relation_company_ceo = self.env.ref(
  47. 'partner_multi_relation_tabs.relation_company_ceo')