summaryrefslogtreecommitdiff
path: root/addons/note/models
diff options
context:
space:
mode:
authorMahendra Barad <mba@odoo.com>2018-05-30 16:18:11 +0200
committerThibault Delavallée <tde@odoo.com>2018-05-31 16:45:51 +0200
commit642970494e6f78741a8e0b792031957e4910e8ba (patch)
treebbb111a3ef3c53592f70c8c57b57e237c0a6067e /addons/note/models
parent3239c9176615723cbd59c494b58f9df3b94bccba (diff)
[REF] mail, note: rename systray method giving data for web client
As it becomes used to display more things than just counting activities let us rename the method. Future commits will add new features in the systray like meetings. This commit is linked to task ID 60593.
Diffstat (limited to 'addons/note/models')
-rw-r--r--addons/note/models/res_users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/note/models/res_users.py b/addons/note/models/res_users.py
index f4ae07e86a4..6f248c47664 100644
--- a/addons/note/models/res_users.py
+++ b/addons/note/models/res_users.py
@@ -49,12 +49,12 @@ GROUP BY id"""
_logger.info('Note default columns created for user id %s', user.id)
@api.model
- def activity_user_count(self):
+ def systray_get_activities(self):
""" If user have not scheduled any note, it will not appear in activity menu.
Making note activity always visible with number of notes on label. If there is no notes,
activity menu not visible for note.
"""
- activities = super(Users, self).activity_user_count()
+ activities = super(Users, self).systray_get_activities()
notes_count = self.env['note.note'].search_count([('user_id', '=', self.env.uid)])
if notes_count:
note_index = next((index for (index, a) in enumerate(activities) if a["model"] == "note.note"), None)