summaryrefslogtreecommitdiff
path: root/addons/note/note.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/note/note.py')
-rw-r--r--addons/note/note.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/addons/note/note.py b/addons/note/note.py
index 00c67c37191..7f03f43b36a 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -72,12 +72,6 @@ class note_note(osv.osv):
def onclick_note_not_done(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'open': True}, context=context)
- #used for undisplay the follower if it's the current user
- def _get_my_current_partner(self, cr, uid, ids, name, args, context=None):
- user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
- pid = user.partner_id and user.partner_id.id or False
- return dict.fromkeys(ids, pid)
-
#return the default stage for the uid user
def _get_default_stage_id(self,cr,uid,context=None):
ids = self.pool.get('note.stage').search(cr,uid,[('user_id','=',uid)], context=context)
@@ -101,6 +95,7 @@ class note_note(osv.osv):
'name': fields.function(_get_note_first_line,
string='Note Summary',
type='text', store=True),
+ 'user_id': fields.many2one('res.users', 'Owner'),
'memo': fields.html('Note Content'),
'sequence': fields.integer('Sequence'),
'stage_id': fields.function(_get_stage_per_user,
@@ -113,9 +108,9 @@ class note_note(osv.osv):
'date_done': fields.date('Date done'),
'color': fields.integer('Color Index'),
'tag_ids' : fields.many2many('note.tag','note_tags_rel','note_id','tag_id','Tags'),
- 'current_partner_id' : fields.function(_get_my_current_partner, type="many2one", relation='res.partner', string="Owner"),
}
_defaults = {
+ 'user_id': lambda self, cr, uid, ctx=None: uid,
'open' : 1,
'stage_id' : _get_default_stage_id,
}