[REF] mail.subscription: renamed to mail.followers. Also renamed files accordingly. Views and menu entries have been updated. Also removed an ununsed read field on mail.notification.
bzr revid: tde@openerp.com-20120813191006-jf7vygdyb93k7nxf
This commit is contained in:
parent
59d8cb124c
commit
ff0a280a7e
|
@ -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,
|
||||
}
|
|
@ -2,17 +2,14 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
SUBSCRIPTION
|
||||
!-->
|
||||
|
||||
<record model="ir.ui.view" id="view_subscription_tree">
|
||||
<field name="name">mail.subscription.tree</field>
|
||||
<field name="model">mail.subscription</field>
|
||||
<!-- FOLLOWERS !-->
|
||||
<record model="ir.ui.view" id="view_followers_tree">
|
||||
<field name="name">mail.followers.tree</field>
|
||||
<field name="model">mail.followers</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Subscription">
|
||||
<tree string="Followers">
|
||||
<field name="res_model"/>
|
||||
<field name="res_id"/>
|
||||
<field name="user_id"/>
|
||||
|
@ -20,17 +17,14 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
NOTIFICATION
|
||||
!-->
|
||||
|
||||
<!-- NOTIFICATION !-->
|
||||
<record model="ir.ui.view" id="view_notification_tree">
|
||||
<field name="name">mail.notification.tree</field>
|
||||
<field name="model">mail.notification</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Subscription">
|
||||
<tree string="Notifications">
|
||||
<field name="user_id"/>
|
||||
<field name="message_id"/>
|
||||
<field name="read"/>
|
||||
|
@ -38,9 +32,9 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_subscriptions" model="ir.actions.act_window">
|
||||
<field name="name">Subscriptions</field>
|
||||
<field name="res_model">mail.subscription</field>
|
||||
<record id="action_view_followers" model="ir.actions.act_window">
|
||||
<field name="name">Followers</field>
|
||||
<field name="res_model">mail.followers</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
@ -52,9 +46,9 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- Add subscriptions related menu entries in Settings/Email -->
|
||||
<menuitem name="Subscriptions" id="menu_email_subscriptions" parent="base.menu_email"
|
||||
action="action_view_subscriptions" sequence="30" groups="base.group_no_one"/> -->
|
||||
<!-- Add followers related menu entries in Settings/Email -->
|
||||
<menuitem name="Followers" id="menu_email_followers" parent="base.menu_email"
|
||||
action="action_view_followers" sequence="30" groups="base.group_no_one"/> -->
|
||||
|
||||
<!-- Add notifications related menu entry in Settings/Email -->
|
||||
<menuitem name="Notifications" id="menu_email_notifications" parent="base.menu_email"
|
Loading…
Reference in New Issue