Skip to content

Commit

Permalink
Merge PR OCA#1018 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 3, 2022
2 parents 957f5fe + 6ded329 commit 37a0011
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.5.2
_commit: v1.11.0
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
github_check_license: true
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
include_wkhtmltopdf: false
odoo_version: 15.0
org_name: Odoo Community Association (OCA)
Expand All @@ -15,3 +20,4 @@ repo_slug: project
repo_website: https://github.com/OCA/project
travis_apt_packages: []
travis_apt_sources: []

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
Expand Down
12 changes: 4 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,15 @@ repos:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
- repo: https://github.com/OCA/pylint-odoo
rev: 7.0.2
hooks:
- id: pylint
- id: pylint_odoo
name: pylint with optional checks
args:
- --rcfile=.pylintrc
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==5.0.5
- id: pylint
name: pylint with mandatory checks
- id: pylint_odoo
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


[MASTER]
load-plugins=pylint_odoo
score=n
Expand Down
1 change: 1 addition & 0 deletions .pylintrc-mandatory
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

[MASTER]
load-plugins=pylint_odoo
score=n
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
# Copyright 2022 Moduon - Eduardo de Miguel <edu@moduon.team>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.project.tests.test_project_base import TestProjectCommon
from odoo.tests import TransactionCase


class TestAutoFoldPersonalStages(TestProjectCommon):
class TestAutoFoldPersonalStages(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
user_group_employee = cls.env.ref("base.group_user")
user_group_project_user = cls.env.ref("project.group_project_user")
user_group_project_manager = cls.env.ref("project.group_project_manager")
cls.partner_1 = cls.env["res.partner"].create(
{"name": "Valid Lelitre", "email": "valid.lelitre@agrolait.com"}
)
# Test users to use through the various tests
Users = cls.env["res.users"].with_context(no_reset_password=True)
cls.user_projectuser = Users.create(
{
"name": "Armande ProjectUser",
"login": "armandel",
"password": "armandel",
"email": "armande.projectuser@example.com",
"groups_id": [
(6, 0, [user_group_employee.id, user_group_project_user.id])
],
}
)
cls.user_projectmanager = Users.create(
{
"name": "Bastien ProjectManager",
"login": "bastien",
"email": "bastien.projectmanager@example.com",
"groups_id": [
(6, 0, [user_group_employee.id, user_group_project_manager.id])
],
}
)
# Test 'Pigs' project
cls.project_pigs = (
cls.env["project.project"]
.with_context(mail_create_nolog=True)
.create(
{
"name": "Pigs",
"privacy_visibility": "employees",
"alias_name": "project+pigs",
"partner_id": cls.partner_1.id,
}
)
)
cls.project_task_stages = cls.env["project.task.type"].create(
[
{"sequence": 1, "name": "New"},
Expand Down

0 comments on commit 37a0011

Please sign in to comment.