From 0595ba9da9536108267120facd6416d8bad7f32a Mon Sep 17 00:00:00 2001 From: Christopher Rogos Date: Mon, 9 Sep 2024 15:41:27 +0000 Subject: [PATCH] [IMP] project_type: copy type_id on project/task duplicate --- project_type/models/project_project.py | 2 +- project_type/models/project_task.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/project_type/models/project_project.py b/project_type/models/project_project.py index fe7e92f824..1a15ad1404 100644 --- a/project_type/models/project_project.py +++ b/project_type/models/project_project.py @@ -9,6 +9,6 @@ class ProjectProject(models.Model): type_id = fields.Many2one( comodel_name="project.type", string="Type", - copy=False, + copy=True, domain="[('project_ok', '=', True)]", ) diff --git a/project_type/models/project_task.py b/project_type/models/project_task.py index 5444ca5954..36ab8574d2 100644 --- a/project_type/models/project_task.py +++ b/project_type/models/project_task.py @@ -7,5 +7,8 @@ class ProjectTask(models.Model): _inherit = "project.task" type_id = fields.Many2one( - comodel_name="project.type", string="Type", domain="[('task_ok', '=', True)]" + comodel_name="project.type", + string="Type", + domain="[('task_ok', '=', True)]", + copy=True, )