From 8146a3ed43ea7e28add4408688bfd14f300495e1 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 30 Dec 2013 11:40:45 +0100 Subject: [PATCH] [FIX] note: revert rev 9055 as made impossible to change stage if no rights on other users' relations bzr revid: mat@openerp.com-20131230104045-2h070kuouz4msz1x --- addons/note/note.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/note/note.py b/addons/note/note.py index fe917531472..00c67c37191 100644 --- a/addons/note/note.py +++ b/addons/note/note.py @@ -84,10 +84,9 @@ 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): - 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] + 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 ] 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):