Author: |
Camptocamp,Odoo Community Association (OCA) |
License: |
AGPL-3 |
Branch: |
merge-branch-3582-9.4b3 |
Repository: |
camptocamp/website-cms |
Dependencies: |
cms_form,
mail,
mail_digest,
web,
and
website |
Languages: |
CSS (2327, 40.7%),
JavaScript (43, 0.8%),
LESS (48, 0.8%),
PO File (59, 1.0%),
Python (362, 6.3%),
SVG (2671, 46.8%),
XML (160, 2.8%),
and
reStructuredText (42, 0.7%) |
Other branches: |
merge-branch-3582-9.3.0,
merge-branch-3582-9.3.2,
merge-branch-3582-9.3.3,
merge-branch-3582-9.3.4,
merge-branch-3582-9.3.5,
merge-branch-3582-9.3.6,
merge-branch-3582-9.3.7,
merge-branch-3582-9.4,
merge-branch-3582-9.4.0b1,
merge-branch-3582-9.4.0b2,
merge-branch-3582-9.5.0,
and
merge-branch-3582-9.5.1 |
<a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html:alt:License:AGPL-3"><img src="https://img.shields.io/badge/licence-AGPL--3-blue.svg">
</a>
<a name="cms-notifications"></a>
<h2>CMS notifications</h2>
<a name="features"></a>
<h3>Features</h3>
<p>Manage notifications in your CMS. Provides:</p>
<ul class="simple">
<li>menu item for settings</li>
<li>menu item for notifications listing</li>
<li>flag <cite>has_unread_notif</cite> on user to highlight when the user has an unread notification</li>
<li>flag <cite>cms_type</cite> on message subtype to enable/disable visibility in CMS</li>
</ul>
<p>Depends on <a class="reference external" href="https://github.com/camptocamp/social/tree/add-mail_digest/mail_digest">mail_digest [WIP PR]</a>
and <a class="reference external" href="https://github.com/simahawk/website-cms/tree/add-cms_form-PR/cms_form">cms_form [WIP PR]</a>.</p>
<a name="default-appearance"></a>
<h3>Default appearance</h3>
<img alt="./images/cms_notif_menu.png" src="./images/cms_notif_menu.png" />
<img alt="./images/cms_notif_settings.png" src="./images/cms_notif_settings.png" />
<img alt="./images/cms_notif_listing.png" src="./images/cms_notif_listing.png" />
<a name="customization"></a>
<h3>Customization</h3>
<p>You can customize the form as specified in <code>cms_form</code> docs.
<code>cms_notifications</code> extends the form behavior allowing you to just
provide the fields you need and a mapping between fields and messages'
subtypes.</p>
<pre>
<code lang="python">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
Usage
-----</code>
</pre>
<p>To bring the user to her/his panel:</p>
<pre>
<code lang="html"><a class="btn btn-default" href="/my/settings/notifications">Notifications</a></code>
</pre>
<p>To bring the user to her/his notifications:</p>
<pre>
<code lang="html"><a class="btn btn-default" href="/my/notifications">Notification settings</a></code>
</pre>
<a name="bug-tracker"></a>
<h2>Bug Tracker</h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/website-cms/issues">GitHub Issues</a>. In
case of trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.</p>
<a name="credits"></a>
<h2>Credits</h2>
<a name="contributors"></a>
<h3>Contributors</h3>
<ul class="simple">
<li>Simone Orsi <a class="reference external" href="mailto:simone.orsi@camptocamp.com">simone.orsi@camptocamp.com</a></li>
</ul>
<a name="funders"></a>
<h3>Funders</h3>
<p>The development of this module has been financially supported by: <a class="reference external" href="https://fluxdock.io">Fluxdock.io</a>.</p>
<a name="maintainer"></a>
<h3>Maintainer</h3>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>This module is maintained by the OCA.</p>
<p>OCA, or the Odoo Community Association, is a nonprofit organization
whose mission is to support the collaborative development of Odoo
features and promote its widespread use.</p>
<p>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>