CMS系统的基本通知管理
odoo11-addon-cms-notification的Python项目详细描述
CMS通知
功能
管理CMS中的通知。提供:
- 设置菜单项
- 通知列表的菜单项
- 当用户有未读通知时,在用户上加亮显示“has\u unread\u notif”标志
- 在消息子类型上标记cms类型以启用/禁用cms功能中的可见性(例如通知列表)
默认外观
定制
您可以自定义在cms_formdocs中指定的表单。 cms_notification扩展了表单行为,允许您 提供所需的字段以及字段和消息之间的映射' 子类型。
classCMSNotificationPanel(models.AbstractModel):_inherit='cms.notification.panel.form'enable_my_type=fields.Boolean(string='Enable my type notifications',help=("If active, you will receive notifications ""about this type."))enable_my_type2=fields.Boolean(string='Enable my type 2 notifications',help=("If active, you will receive notifications ""about this type 2."))@propertydef_form_subtype_fields(self):res=super()._form_subtype_fieldsres.update({'enable_my_type':'module.mt_mytype','enable_my_type2':'module.mt_mytype2',})returnres
使用量
将用户带到其面板:
<aclass="btn btn-default"href="/my/settings/notifications">Notifications</a>
将用户带到其通知中:
<aclass="btn btn-default"href="/my/notifications">Notification settings</a>
错误跟踪程序
错误在GitHub Issues上跟踪。在 如果有麻烦,请检查一下你的问题是否已经 报道。如果你首先发现了它,请提供 详细的欢迎反馈。