diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-12-24 16:43:40 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-12-24 16:43:40 +0100 |
| commit | a42bf998e24eab8fcf498a831c2f49638cd4e4d2 (patch) | |
| tree | ff2f3d73159b31a045c603836f9d43f50d133a16 /addons/note/note.py | |
| parent | 90ebde3676b3f4c2a00132313417410ce4ba36b9 (diff) | |
| parent | e453001a7fccb1760cc9b9b85e935a45442886b5 (diff) | |
[MERGE] sync with trunk
bzr revid: mat@openerp.com-20131224154340-pwtp292xac5eodci
Diffstat (limited to 'addons/note/note.py')
| -rw-r--r-- | addons/note/note.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/note/note.py b/addons/note/note.py index 00c67c37191..fe917531472 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -84,9 +84,10 @@ class note_note(osv.osv): return ids and ids[0] or False def _set_stage_per_user(self, cr, uid, id, name, value, args=None, context=None): - note = self.browse(cr, uid, id, context=context) - if not value: return False - stage_ids = [value] + [stage.id for stage in note.stage_ids if stage.user_id.id != uid ] + if not value: + return False + note = self.browse(cr, SUPERUSER_ID, id, context=context) # do it as SUPERUSER because when creating, followers are not necessariliry set (another function field) + stage_ids = [value] + [stage.id for stage in note.stage_ids if stage.user_id.id != uid] return self.write(cr, uid, [id], {'stage_ids': [(6, 0, set(stage_ids))]}, context=context) def _get_stage_per_user(self, cr, uid, ids, name, args, context=None): |
