Search 1.9 billion lines of Odoo code on GitHub

web_extended_email_widget

Author: FactorLibre, Odoo Community Association (OCA)
License: AGPL-3
Branch: extended_email_widget
Repository: factorlibre/web
Dependencies: web
Languages: JavaScript (67, 49.3%), Python (15, 11.0%), XML (13, 9.6%), and reStructuredText (41, 30.1%)

<img alt="License" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg"> <a name="extended-email-widget"></a> <h2>Extended Email Widget</h2> <a name="features"></a> <h2>Features</h2> <ul class="simple"> <li>This module allows to change the default behaviour of email widgets with the possibility to add cc, bcc and subject fields.</li> <li>It also adds the possibility to create a button (from the object with a client action) to send a email to specified addresses, that is useful in tree views or to send a email to all contacts</li> </ul> <a name="usage"></a> <h2>Usage</h2> <p>In the view declaration add an options attribute to an email widget field with the reference to the fields in view to include:</p> <pre> <code>&lt;field name=&quot;email&quot; widget=&quot;email&quot; options=&quot;{'cc': 'email_cc', 'subject': 'name'}/&gt;</code> </pre> <p>This code will use the field email_cc from the view as the cc, and the field name to use as email subject.</p> <p>Allowed options are:</p> <ul class="simple"> <li>cc</li> <li>bcc (May not work with all email clients)</li> <li>replyto (May not work with all email clients)</li> <li>subject</li> </ul> <p>For use the button its possible to declare a new function in the object that will be used:</p> <pre> <code>def send_email_button(self, cr, uid, ids, context=None): assert len(ids) == 1 partner = self.browse(cr, uid, ids[0], context=context) bcc_address = self.pool['res.user'].browse(cr, uid, uid).email return { 'type': 'ir.actions.client', 'name': 'Send Email', 'tag': 'email_button.mail_link', 'params': { 'email': partner.email, 'bcc': bcc_address, 'subject': partner.name } }</code> </pre> <a name="credits"></a> <h2>Credits</h2> <a name="contributors"></a> <h3>Contributors</h3> <ul class="simple"> <li>Hugo Santos &lt;<a class="reference external" href="mailto:hugo.santos&#64;factorlibre.com">hugo.santos&#64;factorlibre.com</a>&gt;</li> </ul> <a name="maintainer"></a> <h3>Maintainer</h3> <a class="reference external image-reference" href="http://odoo-community.org"><img alt="Odoo Community Association" src="http://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="http://odoo-community.org">http://odoo-community.org</a>.</p>