diff --git a/project_customer_access/README.rst b/project_customer_access/README.rst new file mode 100644 index 0000000..eb6d93e --- /dev/null +++ b/project_customer_access/README.rst @@ -0,0 +1,32 @@ +======================= +Project Customer Access +======================= + +Project menu and views for customers in your own ERP + +Purpose +======= + +This module does this and that... + +Explain the use case. + +Configuration +============= + +To configure this module, you need to: + +#. Go to ... + +Usage +===== + +To use this module, you need to: + +#. Go to ... + + +How to test +=========== + +... diff --git a/project_customer_access/__init__.py b/project_customer_access/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/project_customer_access/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_customer_access/__manifest__.py b/project_customer_access/__manifest__.py new file mode 100644 index 0000000..eb93f26 --- /dev/null +++ b/project_customer_access/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Akretion +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Project Customer Access", + "summary": """Project menu and views for customers in your own ERP""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "Akretion", + "website": "http://akretion.com", + "depends": [ + "project", + # https://github.com/OCA/server-backend + "base_group_backend", + ], + "data": [ + "data/res_groups.xml", + "security/ir.model.access.csv", + "views/project_task_views.xml", + ], + "demo": [], +} diff --git a/project_customer_access/data/res_groups.xml b/project_customer_access/data/res_groups.xml new file mode 100644 index 0000000..eb8f8bf --- /dev/null +++ b/project_customer_access/data/res_groups.xml @@ -0,0 +1,18 @@ + + + + Project Access + 90 + + + Customer + + + + + Manager + + + + + \ No newline at end of file diff --git a/project_customer_access/models/__init__.py b/project_customer_access/models/__init__.py new file mode 100644 index 0000000..edf2d36 --- /dev/null +++ b/project_customer_access/models/__init__.py @@ -0,0 +1 @@ +from . import project_task diff --git a/project_customer_access/models/project_task.py b/project_customer_access/models/project_task.py new file mode 100644 index 0000000..d32ffa0 --- /dev/null +++ b/project_customer_access/models/project_task.py @@ -0,0 +1,10 @@ +# Copyright 2024 Akretion +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models + + +class ProjectTask(models.Model): + _inherit = "project.task" + + technical_description = fields.Html() diff --git a/project_customer_access/security/ir.model.access.csv b/project_customer_access/security/ir.model.access.csv new file mode 100644 index 0000000..329e01f --- /dev/null +++ b/project_customer_access/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_customer_project,access_customer_project,project.model_project_project,project_customer_access.group_customer,1,0,0,0 +access_customer_task,access_customer_task,project.model_project_task,project_customer_access.group_customer,1,0,0,0 +access_customer_task_type,access_customer_task_type,project.model_project_task_type,project_customer_access.group_customer,1,0,0,0 +access_project_customer_manager,access_project_customer_manager,project.model_project_task,project_customer_access.group_manager,1,1,1,1 \ No newline at end of file diff --git a/project_customer_access/static/description/icon.svg b/project_customer_access/static/description/icon.svg new file mode 100644 index 0000000..7fd6ba9 --- /dev/null +++ b/project_customer_access/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project_customer_access/tests/__init__.py b/project_customer_access/tests/__init__.py new file mode 100644 index 0000000..fb93ebf --- /dev/null +++ b/project_customer_access/tests/__init__.py @@ -0,0 +1 @@ +from . import test_project_customer_access diff --git a/project_customer_access/tests/test_project_customer_access.py b/project_customer_access/tests/test_project_customer_access.py new file mode 100644 index 0000000..105b181 --- /dev/null +++ b/project_customer_access/tests/test_project_customer_access.py @@ -0,0 +1,29 @@ +# Copyright 2024 Akretion +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestProjectCustomerAccess(TransactionCase): + + def setUp(self): + super().setUp() + self.group_customer = self.env.ref("project_customer_access.group_customer") + self.group_manager = self.env.ref("project_customer_access.group_manager") + self.customer = self.env["res.users"].create( + { + "name": "Customer", + "login": "customer", + "groups_id": [Command.set(self.group_customer.ids)], + } + ) + self.manager = self.env["res.users"].create( + { + "name": "Manager", + "login": "manager", + "groups_id": [Command.set(self.group_manager.ids)], + } + ) + + def test_1(self): + pass diff --git a/project_customer_access/views/project_task_views.xml b/project_customer_access/views/project_task_views.xml new file mode 100644 index 0000000..65f086b --- /dev/null +++ b/project_customer_access/views/project_task_views.xml @@ -0,0 +1,459 @@ + + + + + + + + + project.task.search.form (in project_customer_access) + project.task + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sub-tasks + project.task + tree,kanban,form + + [('id', 'child_of', active_id), ('id', '!=', active_id)] + {'show_project_update': False, 'default_parent_id': active_id} + +

+ No tasks found. Let's create one! +

+

+ Keep track of the progress of your tasks from creation to completion.
+ Collaborate efficiently by chatting in real-time or via email. +

+
+
+ + + + project.task.form (in project_customer_access) + project.task + + +
+ + + + + + + + + + +
+ +
+ +
+ + +
+ +
+

+
+ + +
+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +