diff --git a/project_tasks_from_templates/__manifest__.py b/project_tasks_from_templates/__manifest__.py index 5cc4382e2..7d4b16107 100755 --- a/project_tasks_from_templates/__manifest__.py +++ b/project_tasks_from_templates/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################### { 'name': 'Project Templates', - 'version': '17.0.1.0.1', + 'version': '17.0.1.0.2', 'category': "Project", 'summary': "This app allows your project team to create project" "template and task template", diff --git a/project_tasks_from_templates/doc/RELEASE_NOTES.md b/project_tasks_from_templates/doc/RELEASE_NOTES.md index 66cd2b1fa..ab9708350 100755 --- a/project_tasks_from_templates/doc/RELEASE_NOTES.md +++ b/project_tasks_from_templates/doc/RELEASE_NOTES.md @@ -8,4 +8,9 @@ #### 23.09.2024 #### Version 17.0.1.0.1 ##### UPDT +- Bug Fix-Resolved the duplicate issues. + +#### 10.10.2024 +#### Version 17.0.1.0.2 +##### UPDT - Bug Fix-Resolved the duplicate issues. \ No newline at end of file diff --git a/project_tasks_from_templates/models/project_task_template.py b/project_tasks_from_templates/models/project_task_template.py index 09c4e644d..a184104fe 100644 --- a/project_tasks_from_templates/models/project_task_template.py +++ b/project_tasks_from_templates/models/project_task_template.py @@ -19,7 +19,7 @@ # If not, see . # ############################################################################### -from odoo import fields, models, api +from odoo import fields, models, _ class ProjectTaskTemplate(models.Model): @@ -28,7 +28,7 @@ class ProjectTaskTemplate(models.Model): _description = 'Project Task Template' name = fields.Char(string='Template Name', translate=True, - help='Name for the task template.', copy=False) + help='Name for the task template.') task_ids = fields.One2many( 'project.sub.task', 'project_template_id', string='Tasks', @@ -38,6 +38,12 @@ class ProjectTaskTemplate(models.Model): string='Stages', help='List of the stages associated with this template.', copy=True) + def copy(self, default=None): + """Duplicating the Model""" + default = dict(default or {}) + default.setdefault('name', _("%(old_name)s (copy)", old_name=self.name)) + return super().copy(default=default) + class ProjectStage(models.Model): """A model to define task templates for projects."""