Search 1.9 billion lines of Odoo code on GitHub

cms_notification

Author: Camptocamp,Odoo Community Association (OCA)
License: LGPL-3
Branch: 11.0
Repository: akretion/website-cms
Dependencies: cms_form, mail, mail_digest, and website
Languages: JavaScript (50, 4.3%), LESS (48, 4.1%), PO File (226, 19.5%), Python (588, 50.8%), XML (173, 14.9%), and reStructuredText (73, 6.3%)
Other branches: 9.0
Other repositories: BTETON/website-cms, Change2improve/website-cms, CompassionCH/website-cms, ERPLibre/website-cms, ForgeFlow/website-cms, Gabinete-Digital/website-cms, Guobower/website-cms, Ingeos/website-cms, JazziMc/website-cms, MjAbuz/website-cms, NL66278/website-cms, NeatNerdPrime/website-cms, Nooka10/website-cms, OCA/website-cms, PCatinean/website-cms, TelmoSenseFly/website-cms, VisiionSolucionesTecnologicas/website-cms, anhvu-sg/website-cms, apetbiz/website-cms, bishalgit/website-cms, caiuka/website-cms, camptocamp/website-cms, elvirekemajou/website-cms, gfcapalbo/website-cms, grindtildeath/website-cms, hbrunn/website-cms, hinfo506/website-cms, isoscl/website-cms, josueBulle/website-cms, kevin070982/website-cms, lideritjnma/website-cms, lukehuang/website-cms, one2pret/website-cms, pscloud/website-cms, ravishekharco/website-cms, redcor/website-cms, rsullivan2704/website-cms, sanube/website-cms, simahawk/website-cms, steingabelgaard/website-cms, wahello/website-cms, and x0rzkov/odoo-website-cms

<a class="reference external image-reference" href="http://www.gnu.org/licenses/LGPL-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-lgpl--3-blue.svg"> </a> <a name="cms-notification"></a> <h2>CMS notification</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 features (notifications listing for instance)</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_notification</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=(&quot;If active, you will receive notifications &quot; &quot;about this type.&quot;) ) enable_my_type2 = fields.Boolean( string='Enable my type 2 notifications', help=(&quot;If active, you will receive notifications &quot; &quot;about this type 2.&quot;) ) &#64;property def _form_subtype_fields(self): res = super()._form_subtype_fields res.update({ 'enable_my_type': 'module.mt_mytype', 'enable_my_type2': 'module.mt_mytype2', }) return res</code> </pre> <a name="usage"></a> <h3>Usage</h3> <p>To bring the user to her/his panel:</p> <pre> <code lang="html">&lt;a class=&quot;btn btn-default&quot; href=&quot;/my/settings/notifications&quot;&gt;Notifications&lt;/a&gt;</code> </pre> <p>To bring the user to her/his notifications:</p> <pre> <code lang="html">&lt;a class=&quot;btn btn-default&quot; href=&quot;/my/notifications&quot;&gt;Notification settings&lt;/a&gt;</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&#64;camptocamp.com">simone.orsi&#64;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>