From c8aac116a688a83050bb88bd5a5eed07eb895138 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 9 Jun 2016 17:23:50 +0200 Subject: [PATCH] [FIX] project: duplicate project must copy followers Since duplicating a project copies the project tasks, with the followers, the project followers must remain as well. This is done in the already overriden method `copy` instead of simply adding `copy=True` on the according one2many field, since this field is defined on the inherited model `mail.thread`, and to add `copy=True`, in the old api, we would have to re-define the `message_follower_ids` field within the `project.project` model completely, making sure to copy all properties opw-680313 --- addons/project/project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project/project.py b/addons/project/project.py index d46d4996ea9..2a56f437c6b 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -255,6 +255,7 @@ class project(osv.osv): proj = self.browse(cr, uid, id, context=context) if not default.get('name'): default.update(name=_("%s (copy)") % (proj.name)) + default['message_follower_ids'] = [(6, 0, proj.message_follower_ids.ids)] res = super(project, self).copy(cr, uid, id, default, context) self.map_tasks(cr, uid, id, res, context=context) return res