diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-06-09 17:23:50 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-06-09 17:27:31 +0200 |
| commit | c8aac116a688a83050bb88bd5a5eed07eb895138 (patch) | |
| tree | fec065720e280560ea219c9a1c38337a3a65f5c6 /addons/project/project.py | |
| parent | 8049d1e855204c64b56577ecdc32f838f494474c (diff) | |
[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
Diffstat (limited to 'addons/project/project.py')
| -rw-r--r-- | addons/project/project.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
