Browse Source

Oct 14: [FIX] Bug Fixed 'project_tasks_from_templates'

pull/347/head
Cybrosys Technologies 7 months ago
parent
commit
201f7682fb
  1. 2
      project_tasks_from_templates/__manifest__.py
  2. 5
      project_tasks_from_templates/doc/RELEASE_NOTES.md
  3. 10
      project_tasks_from_templates/models/project_task_template.py

2
project_tasks_from_templates/__manifest__.py

@ -21,7 +21,7 @@
############################################################################### ###############################################################################
{ {
'name': 'Project Templates', 'name': 'Project Templates',
'version': '17.0.1.0.1', 'version': '17.0.1.0.2',
'category': "Project", 'category': "Project",
'summary': "This app allows your project team to create project" 'summary': "This app allows your project team to create project"
"template and task template", "template and task template",

5
project_tasks_from_templates/doc/RELEASE_NOTES.md

@ -9,3 +9,8 @@
#### Version 17.0.1.0.1 #### Version 17.0.1.0.1
##### UPDT ##### UPDT
- Bug Fix-Resolved the duplicate issues. - Bug Fix-Resolved the duplicate issues.
#### 10.10.2024
#### Version 17.0.1.0.2
##### UPDT
- Bug Fix-Resolved the duplicate issues.

10
project_tasks_from_templates/models/project_task_template.py

@ -19,7 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################### ###############################################################################
from odoo import fields, models, api from odoo import fields, models, _
class ProjectTaskTemplate(models.Model): class ProjectTaskTemplate(models.Model):
@ -28,7 +28,7 @@ class ProjectTaskTemplate(models.Model):
_description = 'Project Task Template' _description = 'Project Task Template'
name = fields.Char(string='Template Name', translate=True, 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( task_ids = fields.One2many(
'project.sub.task', 'project_template_id', 'project.sub.task', 'project_template_id',
string='Tasks', string='Tasks',
@ -38,6 +38,12 @@ class ProjectTaskTemplate(models.Model):
string='Stages', string='Stages',
help='List of the stages associated with this template.', copy=True) 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): class ProjectStage(models.Model):
"""A model to define task templates for projects.""" """A model to define task templates for projects."""

Loading…
Cancel
Save