mirror of
https://github.com/bringout/oca-project.git
synced 2026-04-18 14:21:59 +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,36 @@
|
|||
# Copyright 2018 - Brain-tec AG - Carlos Jesus Cebrian
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestProjectCases(TransactionCase):
|
||||
"""Prepare data to test the module."""
|
||||
|
||||
def setUp(self):
|
||||
"""Create user, task, project as well as refre action of the user."""
|
||||
super(TestProjectCases, self).setUp()
|
||||
|
||||
# Create new User
|
||||
# Add it to the `project user` group
|
||||
self.project_user = self.env["res.users"].create(
|
||||
{
|
||||
"company_id": self.env.ref("base.main_company").id,
|
||||
"name": "Carlos Project User",
|
||||
"login": "cpu",
|
||||
"email": "cpu@yourcompany.com",
|
||||
"groups_id": [(6, 0, [self.ref("project.group_project_user")])],
|
||||
}
|
||||
)
|
||||
|
||||
# Create new project
|
||||
self.project = self.env["project.project"].create({"name": "Project Test"})
|
||||
|
||||
# Create new task
|
||||
self.task = self.env["project.task"].create(
|
||||
{"project_id": self.project.id, "name": "Task Test"}
|
||||
)
|
||||
self.product = self.env.ref("product.consu_delivery_03")
|
||||
|
||||
# Refer to a action from the user created
|
||||
self.action = self.task.with_user(self.project_user.id)
|
||||
Loading…
Add table
Add a link
Reference in a new issue