Search 1.9 billion lines of Odoo code on GitHub

cms_notifications

Author: Camptocamp,Odoo Community Association (OCA)
License: AGPL-3
Branch: merge-branch-3582-9.3.0
Repository: camptocamp/website-cms
Dependencies: cms_form, mail, and mail_digest
Languages: PO File (58, 16.8%), Python (214, 62.0%), XML (36, 10.4%), and reStructuredText (37, 10.7%)
Other branches: 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.4b3, 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>CMS form form for managing personal notifications settings.</p> <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="usage"></a> <h3>Usage</h3> <p>To bring the user to its panel:</p> <pre> <code lang="html">&lt;a class=&quot;btn btn-default&quot; href=&quot;/my/settings/notification&quot;&gt;Notification settings&lt;/a&gt;</code> </pre> <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=(&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(CMSNotificationPanel, self)._form_subtype_fields res.update({ 'enable_my_type': 'module.mt_mytype', 'enable_my_type2': 'module.mt_mytype2', }) return res</code> </pre> <p>The form will look like this:</p> <img alt="./images/preview.png" src="./images/preview.png" /> <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>