diff --git a/project_tasks_from_templates/README.rst b/project_tasks_from_templates/README.rst
index 3639dba0d..5dee805f4 100755
--- a/project_tasks_from_templates/README.rst
+++ b/project_tasks_from_templates/README.rst
@@ -6,9 +6,14 @@ Project Templates
=================
This module will help you to create projects and tasks from templates.
+Features
+========
+* Allows to create project from project template.
+* Multiple levels of tasks and sub tasks from template.
+
Configuration
=============
-* No additional configurations needed
+Nothing to configure.
License
-------
@@ -21,8 +26,9 @@ Company
Credits
-------
-* Developers (V15) Ajmunnisa KP, Contact : odoo@cybrosys.com
- (V16) Anfas Faisal K, Contact : odoo@cybrosys.com
+* Developers (V15) Ajmunnisa KP,
+ (V16) Anfas Faisal K,
+ Contact: odoo@cybrosys.com
Contacts
--------
@@ -40,6 +46,8 @@ Maintainer
This module is maintained by Cybrosys Technologies.
+For support and more information, please visit `Our Website `__
+
Further information
===================
HTML Description: ``__
diff --git a/project_tasks_from_templates/__init__.py b/project_tasks_from_templates/__init__.py
index f03fb2c25..2ad5188e6 100755
--- a/project_tasks_from_templates/__init__.py
+++ b/project_tasks_from_templates/__init__.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,5 +18,5 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
+###############################################################################
from . import models
diff --git a/project_tasks_from_templates/__manifest__.py b/project_tasks_from_templates/__manifest__.py
index baf712856..78017c28b 100755
--- a/project_tasks_from_templates/__manifest__.py
+++ b/project_tasks_from_templates/__manifest__.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,7 +18,7 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
+###############################################################################
{
'name': 'Project Templates',
'version': '16.0.1.0.0',
@@ -40,9 +40,9 @@
'security/ir.model.access.csv',
'views/project_project_views.xml',
'views/project_task_custom_views.xml',
- 'views/project_task_template_views.xml'
+ 'views/project_task_template_views.xml',
],
- 'images': ['static/description/banner.png'],
+ 'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
diff --git a/project_tasks_from_templates/doc/RELEASE_NOTES.md b/project_tasks_from_templates/doc/RELEASE_NOTES.md
index 6e70e94c8..c0788d94b 100755
--- a/project_tasks_from_templates/doc/RELEASE_NOTES.md
+++ b/project_tasks_from_templates/doc/RELEASE_NOTES.md
@@ -1,7 +1,5 @@
## Module
-
-#### 06.11.2023
+#### 09.01.2024
#### Version 16.0.1.0.0
#### ADD
-
- Initial Commit for Project Templates
diff --git a/project_tasks_from_templates/models/__init__.py b/project_tasks_from_templates/models/__init__.py
index 692071400..4cd63f36f 100755
--- a/project_tasks_from_templates/models/__init__.py
+++ b/project_tasks_from_templates/models/__init__.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,7 +18,7 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
+###############################################################################
from . import project_project
from . import project_task_custom
from . import project_task_template
diff --git a/project_tasks_from_templates/models/project_project.py b/project_tasks_from_templates/models/project_project.py
index 5d0a30ac8..f2b1e60eb 100755
--- a/project_tasks_from_templates/models/project_project.py
+++ b/project_tasks_from_templates/models/project_project.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,7 +18,7 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
+###############################################################################
from odoo import fields, models
@@ -44,15 +44,23 @@ class ProjectProject(models.Model):
Returns:
dict: Action configuration to open the project form.
"""
- for item in self.project_template_id.task_ids:
- self._create_task(item, False)
- return {
- 'view_mode': 'form',
- 'res_model': 'project.project',
- 'res_id': self.id,
- 'type': 'ir.actions.act_window',
- 'context': self._context
- }
+ if not self.project_template_id.stage_ids:
+ for item in self.project_template_id.task_ids:
+ self._create_task(item, False)
+ return {
+ 'view_mode': 'form',
+ 'res_model': 'project.project',
+ 'res_id': self.id,
+ 'type': 'ir.actions.act_window',
+ 'context': self._context
+ }
+ else:
+ for item in self.project_template_id.stage_ids:
+ if self.id not in item.project_stage_id.project_ids.ids:
+ item.project_stage_id.project_ids = [(4, self.id)]
+ for task in item.task_ids:
+ self._create_task_with_stage(task, item.project_stage_id,
+ False)
def _create_task(self, item, parent):
"""Creates a new project task for the given item and attaches it to
@@ -61,6 +69,7 @@ class ProjectProject(models.Model):
item (models.Model): project task
parent (int): id of parent project task
"""
+
task = self.env['project.task'].sudo().create({
'project_id': self.id,
'name': item.name,
@@ -68,7 +77,28 @@ class ProjectProject(models.Model):
'stage_id': self.env['project.task.type'].search(
[('sequence', '=', 1)], limit=1).id,
'user_ids': item.user_ids,
- 'description': item.description
- })
+ 'description': item.description,
+ 'kanban_state': item.state or 'normal',
+ })
for sub_task in item.child_ids:
self._create_task(sub_task, task.id)
+
+ def _create_task_with_stage(self, item, stage, parent=False):
+ """Creates a new project task with stage for the given item and attaches it to
+ the current project.
+ Args:
+ item (models.Model): project task
+ parent (int): id of parent project task
+ """
+
+ task = self.env['project.task'].sudo().create({
+ 'project_id': self.id,
+ 'name': item.name,
+ 'parent_id': parent,
+ 'stage_id': stage.id,
+ 'user_ids': item.user_ids,
+ 'description': item.description,
+ 'kanban_state': item.state or 'normal',
+ })
+ for sub_task in item.child_ids:
+ self._create_task_with_stage(sub_task, stage, task.id)
diff --git a/project_tasks_from_templates/models/project_task_custom.py b/project_tasks_from_templates/models/project_task_custom.py
index 2d7eb3736..03c4f03b4 100644
--- a/project_tasks_from_templates/models/project_task_custom.py
+++ b/project_tasks_from_templates/models/project_task_custom.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,7 +18,7 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
+###############################################################################
from odoo import fields, models
@@ -27,8 +27,7 @@ class ProjectTaskCustom(models.Model):
and sub-tasks
Methods:
action_open_task():
- Returns an action to open the current task in a form view
- """
+ Returns an action to open the current task in a form view"""
_name = 'project.task.custom'
_description = 'Project Task Custom'
@@ -54,6 +53,12 @@ class ProjectTaskCustom(models.Model):
string="Show Tasks Page",
readonly=False)
+ state = fields.Selection([
+ ('normal', 'In Progress'),
+ ('done', 'Ready'),
+ ('blocked', 'Blocked')], string='State',
+ default='normal', required=True)
+
def action_open_task(self):
""" Action method to open the current task in a form view.
Returns:
diff --git a/project_tasks_from_templates/models/project_task_template.py b/project_tasks_from_templates/models/project_task_template.py
index a8c2f3bd6..bb68baad2 100644
--- a/project_tasks_from_templates/models/project_task_template.py
+++ b/project_tasks_from_templates/models/project_task_template.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-################################################################################
+###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
-# Copyright (C) 2023-TODAY Cybrosys Technologies().
-# Author: Anfas Faisal K (odoo@cybrosys.info)
+# Copyright (C) 2024-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
@@ -18,12 +18,12 @@
# (AGPL v3) along with this program.
# If not, see .
#
-################################################################################
-from odoo import fields, models
+###############################################################################
+from odoo import fields, models , api
class ProjectTaskTemplate(models.Model):
- """ A model to define task templates for projects."""
+ """A model to define task templates for projects."""
_name = 'project.task.template'
_description = 'Project Task Template'
@@ -33,3 +33,32 @@ class ProjectTaskTemplate(models.Model):
'project.task.custom', 'project_template_id',
string='Tasks',
help='List of the tasks associated with this template.')
+ stage_ids = fields.One2many(
+ 'project.stage', 'project_template_id',
+ string='Stages',
+ help='List of the stages associated with this template.')
+
+
+class ProjectStage(models.Model):
+ """A model to define task templates for projects."""
+ _name = 'project.stage'
+ _order = "sequence,id"
+
+ project_template_id = fields.Many2one(
+ 'project.task.template', string='Project Template',
+ help='Select a project task template to use for this task.')
+ project_stage_id = fields.Many2one(
+ 'project.task.type', string='Project Stage',
+ help='Select a project stage. ',required=True)
+ task_ids = fields.Many2many(
+ 'project.task.custom',
+ help='Choose the tasks corresponding to each stage')
+
+ sequence = fields.Integer(related="project_stage_id.sequence",readonly=False)
+
+
+class ProjectTaskType(models.Model):
+ _inherit = "project.task.type"
+
+ project_template_id = fields.Many2one(
+ 'project.task.template')
diff --git a/project_tasks_from_templates/security/ir.model.access.csv b/project_tasks_from_templates/security/ir.model.access.csv
index 17f7af79d..3e94ed2a8 100755
--- a/project_tasks_from_templates/security/ir.model.access.csv
+++ b/project_tasks_from_templates/security/ir.model.access.csv
@@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_project_task_template_manager,access.project.task.template.manager,model_project_task_template,project.group_project_manager,1,1,1,1
access_project_task_custom_manager,access.project.task.custom.manager,model_project_task_custom,project.group_project_manager,1,1,1,1
+access_project_stage,access.project.stage,model_project_stage,project.group_project_manager,1,1,1,1
diff --git a/project_tasks_from_templates/static/description/assets/icons/capture (1).png b/project_tasks_from_templates/static/description/assets/icons/capture (1).png
new file mode 100644
index 000000000..8824deafc
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/icons/capture (1).png differ
diff --git a/project_tasks_from_templates/static/description/assets/icons/img.png b/project_tasks_from_templates/static/description/assets/icons/img.png
new file mode 100644
index 000000000..70197f477
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/icons/img.png differ
diff --git a/project_tasks_from_templates/static/description/assets/icons/photo-capture.png b/project_tasks_from_templates/static/description/assets/icons/photo-capture.png
new file mode 100644
index 000000000..06c111758
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/icons/photo-capture.png differ
diff --git a/project_tasks_from_templates/static/description/assets/misc/Cybrosys R.png b/project_tasks_from_templates/static/description/assets/misc/Cybrosys R.png
new file mode 100644
index 000000000..da4058087
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/misc/Cybrosys R.png differ
diff --git a/project_tasks_from_templates/static/description/assets/misc/email.svg b/project_tasks_from_templates/static/description/assets/misc/email.svg
new file mode 100644
index 000000000..15291cdc3
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/email.svg
@@ -0,0 +1,33 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/phone.svg b/project_tasks_from_templates/static/description/assets/misc/phone.svg
new file mode 100644
index 000000000..b7bd7f251
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/phone.svg
@@ -0,0 +1,3 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/star (1) 2.svg b/project_tasks_from_templates/static/description/assets/misc/star (1) 2.svg
new file mode 100644
index 000000000..5ae9f507a
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/star (1) 2.svg
@@ -0,0 +1,9 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/support (1) 1.svg b/project_tasks_from_templates/static/description/assets/misc/support (1) 1.svg
new file mode 100644
index 000000000..7d37a8f30
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/support (1) 1.svg
@@ -0,0 +1,9 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/support-email.svg b/project_tasks_from_templates/static/description/assets/misc/support-email.svg
new file mode 100644
index 000000000..eb70370d6
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/support-email.svg
@@ -0,0 +1,6 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/tick-mark.svg b/project_tasks_from_templates/static/description/assets/misc/tick-mark.svg
new file mode 100644
index 000000000..2dbb40187
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/tick-mark.svg
@@ -0,0 +1,17 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/whatsapp 1.svg b/project_tasks_from_templates/static/description/assets/misc/whatsapp 1.svg
new file mode 100644
index 000000000..0bfaf8fc6
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/whatsapp 1.svg
@@ -0,0 +1,9 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/misc/whatsapp.svg b/project_tasks_from_templates/static/description/assets/misc/whatsapp.svg
new file mode 100644
index 000000000..b618aea1d
--- /dev/null
+++ b/project_tasks_from_templates/static/description/assets/misc/whatsapp.svg
@@ -0,0 +1,33 @@
+
diff --git a/project_tasks_from_templates/static/description/assets/modules/1.jpg b/project_tasks_from_templates/static/description/assets/modules/1.jpg
new file mode 100644
index 000000000..e257ddb23
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/modules/1.jpg differ
diff --git a/project_tasks_from_templates/static/description/assets/screenshots/13.png b/project_tasks_from_templates/static/description/assets/screenshots/13.png
index 990596ca6..e537cb5ee 100644
Binary files a/project_tasks_from_templates/static/description/assets/screenshots/13.png and b/project_tasks_from_templates/static/description/assets/screenshots/13.png differ
diff --git a/project_tasks_from_templates/static/description/assets/screenshots/3.png b/project_tasks_from_templates/static/description/assets/screenshots/3.png
index 1cbd20e92..252d8e20b 100644
Binary files a/project_tasks_from_templates/static/description/assets/screenshots/3.png and b/project_tasks_from_templates/static/description/assets/screenshots/3.png differ
diff --git a/project_tasks_from_templates/static/description/assets/screenshots/4.png b/project_tasks_from_templates/static/description/assets/screenshots/4.png
index 6ae42e6ac..bc73148e4 100644
Binary files a/project_tasks_from_templates/static/description/assets/screenshots/4.png and b/project_tasks_from_templates/static/description/assets/screenshots/4.png differ
diff --git a/project_tasks_from_templates/static/description/assets/screenshots/7.png b/project_tasks_from_templates/static/description/assets/screenshots/7.png
new file mode 100644
index 000000000..41ed71414
Binary files /dev/null and b/project_tasks_from_templates/static/description/assets/screenshots/7.png differ
diff --git a/project_tasks_from_templates/views/project_project_views.xml b/project_tasks_from_templates/views/project_project_views.xml
index 54ffc1bb8..db23f666f 100755
--- a/project_tasks_from_templates/views/project_project_views.xml
+++ b/project_tasks_from_templates/views/project_project_views.xml
@@ -21,7 +21,7 @@
+ type="object" class="btn-primary o_open_tasks" attrs="{'invisible':[('project_template_id','=',False)]}"/>
diff --git a/project_tasks_from_templates/views/project_task_custom_views.xml b/project_tasks_from_templates/views/project_task_custom_views.xml
index 297ac8fe2..2adb9b8bf 100644
--- a/project_tasks_from_templates/views/project_task_custom_views.xml
+++ b/project_tasks_from_templates/views/project_task_custom_views.xml
@@ -10,13 +10,16 @@
-
+
-
-
-
+
+
+
+
+
+
diff --git a/project_tasks_from_templates/views/project_task_template_views.xml b/project_tasks_from_templates/views/project_task_template_views.xml
index eb3b46a1d..0f52de52f 100644
--- a/project_tasks_from_templates/views/project_task_template_views.xml
+++ b/project_tasks_from_templates/views/project_task_template_views.xml
@@ -28,11 +28,23 @@
+
+
+
+
+
+
+
+
+
+
+
+