mirror of
https://github.com/bringout/oca-project.git
synced 2026-04-18 21:42:02 +02:00
Move 124 sale modules to oca-sale, create oca-project with 56 project modules from oca-workflow-process
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9eb7ae5807
commit
6094c218b2
2332 changed files with 125826 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import test_project_risk
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestProjectRisk(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.project = cls.env["project.project"].create(
|
||||
{"name": "Research & Development", "privacy_visibility": "followers"}
|
||||
)
|
||||
cls.risk_category = cls.env["project.risk.category"].create({"name": "Quality"})
|
||||
cls.risk = cls.env["project.risk"].create(
|
||||
{
|
||||
"name": "Risk X",
|
||||
"project_id": cls.project.id,
|
||||
"project_risk_category_id": cls.risk_category.id,
|
||||
"probability": "2",
|
||||
"impact": "2",
|
||||
}
|
||||
)
|
||||
|
||||
def test_project(self):
|
||||
self.assertEqual(self.project.project_risk_count, 1)
|
||||
action = self.project.view_risk()
|
||||
self.assertEqual(action["context"]["default_project_id"], self.project.id)
|
||||
self.assertListEqual(action["domain"], [("project_id", "=", self.project.id)])
|
||||
|
||||
def test_risk(self):
|
||||
self.risk.write({"actionee_id": self.env.user.id, "owner_id": self.env.user.id})
|
||||
self.assertEqual(self.risk.rating, "4")
|
||||
Loading…
Add table
Add a link
Reference in a new issue