跳转到主要内容

为您的CMS系统提供基本的通知管理功能

项目描述

License: LGPL-3

CMS通知

特性

管理您的CMS中的通知。提供

  • 设置菜单项

  • 通知列表菜单项

  • 在用户上有未读通知时突出显示的 has_unread_notif 标志

  • 在消息子类型上标记 cms_type 以启用/禁用在CMS中的可见性

依赖于 mail_digest [WIP PR]cms_form [WIP PR]

默认外观

./images/cms_notif_menu.png ./images/cms_notif_settings.png ./images/cms_notif_listing.png

自定义

您可以根据 cms_form 文档中的说明自定义表单。 cms_notification 扩展了表单行为,允许您仅提供所需的字段以及字段和消息子类型之间的映射。

class CMSNotificationPanel(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.")
    )

    @property
    def _form_subtype_fields(self):
        res = super(CMSNotificationPanel, self)._form_subtype_fields
        res.update({
            'enable_my_type': 'module.mt_mytype',
            'enable_my_type2': 'module.mt_mytype2',
        })
        return res

用法

将用户带到他们的面板

<a class="btn btn-default" href="/my/settings/notifications">Notifications</a>

将用户带到他们的通知

<a class="btn btn-default" href="/my/notifications">Notification settings</a>

错误跟踪器

错误在 GitHub Issues 上跟踪。如果遇到问题,请先检查是否已报告您的问题。如果是您首先发现的,请通过提供详细且受欢迎的反馈来帮助我们解决问题。

致谢

贡献者

资助者

本模块的开发得到了以下机构的财务支持: Fluxdock.io

维护者

Odoo Community Association

本模块由OCA维护。

OCA,或Odoo社区协会,是一个非营利组织,其使命是支持Odoo功能的协作开发并推广其广泛使用。

要为此模块做出贡献,请访问 https://odoo-community.org

项目详情


下载文件

下载您平台对应的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

此版本没有可用的源代码分发文件。请参阅生成分发存档的教程

构建分发