diff --git a/addons/mail/mail_subscription.py b/addons/mail/mail_followers.py similarity index 82% rename from addons/mail/mail_subscription.py rename to addons/mail/mail_followers.py index eb6f066a2ef..fcdc78d5f0a 100644 --- a/addons/mail/mail_subscription.py +++ b/addons/mail/mail_followers.py @@ -22,19 +22,21 @@ from osv import osv from osv import fields -class mail_subscription(osv.Model): - """ - mail_subscription holds the data related to the follow mechanism inside OpenERP. +class mail_followers(osv.Model): + """ mail_followers holds the data related to the follow mechanism inside + OpenERP. Users can choose to follow documents (records) of any kind that + inherits from mail.thread. Following documents allow to receive + notifications for new messages. A subscription is characterized by: :param: res_model: model of the followed objects :param: res_id: ID of resource (may be 0 for every objects) :param: user_id: user_id of the follower """ - _name = 'mail.subscription' + _name = 'mail.followers' _rec_name = 'id' _log_access = False _order = 'res_model asc' - _description = 'Mail subscription' + _description = 'Mail Document Followers' _columns = { 'res_model': fields.char('Related Document Model', size=128, required=True, select=1, @@ -46,9 +48,7 @@ class mail_subscription(osv.Model): } class mail_notification(osv.Model): - """ - mail_notification is a relational table modeling messages pushed to users. - :param: read: not used currently + """ mail_notification is a relational table modeling messages pushed to users. """ _name = 'mail.notification' _rec_name = 'id' @@ -60,9 +60,4 @@ class mail_notification(osv.Model): ondelete='cascade', required=True, select=1), 'message_id': fields.many2one('mail.message', string='Message', ondelete='cascade', required=True, select=1), - 'read': fields.boolean('Read', help="Not used currently",), - # TODO: add a timestamp ? or use message date ? - } - _defaults = { - 'read': False, } diff --git a/addons/mail/mail_subscription_view.xml b/addons/mail/mail_followers_view.xml similarity index 64% rename from addons/mail/mail_subscription_view.xml rename to addons/mail/mail_followers_view.xml index c3d79d48308..ebb7104c5b3 100644 --- a/addons/mail/mail_subscription_view.xml +++ b/addons/mail/mail_followers_view.xml @@ -2,17 +2,14 @@ - - - - mail.subscription.tree - mail.subscription + + + mail.followers.tree + mail.followers tree 10 - + @@ -20,17 +17,14 @@ - - + mail.notification.tree mail.notification tree 10 - + @@ -38,9 +32,9 @@ - - Subscriptions - mail.subscription + + Followers + mail.followers form tree,form @@ -52,9 +46,9 @@ tree,form - - --> + + -->