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.

20 lines
788 B

  1. # Copyright 2020 Ecosoft Co., Ltd (http://ecosoft.co.th/)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo.tests.common import TransactionCase
  4. class TestPartnerCompanyGroup(TransactionCase):
  5. def setUp(self):
  6. super().setUp()
  7. self.partner_model = self.env["res.partner"]
  8. self.company = self.partner_model.create(
  9. {"name": "Test Company", "company_type": "company"}
  10. )
  11. self.contact = self.partner_model.create(
  12. {"name": "Test Contact", "type": "contact", "parent_id": self.company.id}
  13. )
  14. def test_partner_company_group(self):
  15. self.company.write({"company_group_id": self.company.id})
  16. self.assertEqual(self.company.company_group_id, self.contact.company_group_id)