Initial commit: OCA Workflow Process packages (456 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:00 +02:00
commit d366e42934
18799 changed files with 1284507 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_project_parent

View file

@ -0,0 +1,28 @@
# Copyright 2020 haulogy SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestProjectParent(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.project_project_1 = cls.env.ref("project.project_project_1")
cls.project_project_2 = cls.env.ref("project.project_project_2")
cls.project_project_3 = cls.env["project.project"].create(
{"name": "TestProject", "parent_id": cls.project_project_1.id}
)
def test_parent_childs_project(self):
self.assertIn(self.project_project_2, self.project_project_1.child_ids)
self.assertIn(self.project_project_3, self.project_project_1.child_ids)
def test_action_open_child_project(self):
res = self.project_project_1.action_open_child_project()
self.assertEqual(
res.get("domain"), [("parent_id", "=", self.project_project_1.id)]
)
self.assertEqual(
res.get("context").get("default_parent_id"), self.project_project_1.id
)