This module was written to allow you to write email templates in QWeb instead
of jinja2. The advantage here is that with QWeb, you can make use of
inheritance and the ``call`` statement, which allows you to reuse designs and
snippets in multiple templates, making your development process simpler.
Furthermore, QWeb views are easier to edit with the integrated ACE editor.
**Table of contents**
..contents::
:local:
Usage
=====
@ -21,45 +45,48 @@ To use this module, you need to:
#. Select a QWeb view to be used to render the body field
#. Apart from QWeb's standard variables, you also have access to ``object`` and ``email_template``, which are browse records of the current object and the email template in use, respectively.
#. Select `QWeb` in the field `Body templating engine`
#. Select a QWeb view to be used to render the body field
#. Apart from QWeb's standard variables, you also have access to ``object`` and ``email_template``, which are browse records of the current object and the email template in use, respectively.
<p><aclass="reference external"href="https://odoo-community.org/page/development-status"><imgalt="Beta"src="https://img.shields.io/badge/maturity-Beta-yellow.png"/></a><aclass="reference external"href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><imgalt="License: AGPL-3"src="https://img.shields.io/badge/licence-AGPL--3-blue.png"/></a><aclass="reference external"href="https://github.com/OCA/social/tree/12.0/email_template_qweb"><imgalt="OCA/social"src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github"/></a><aclass="reference external"href="https://translation.odoo-community.org/projects/social-12-0/social-12-0-email_template_qweb"><imgalt="Translate me on Weblate"src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png"/></a><aclass="reference external"href="https://runbot.odoo-community.org/runbot/205/12.0"><imgalt="Try me on Runbot"src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png"/></a></p>
<p>This module was written to allow you to write email templates in QWeb instead
of jinja2. The advantage here is that with QWeb, you can make use of
inheritance and the <ttclass="docutils literal">call</tt> statement, which allows you to reuse designs and
snippets in multiple templates, making your development process simpler.
Furthermore, QWeb views are easier to edit with the integrated ACE editor.</p>
<li>Select <cite>QWeb</cite> in the field <cite>Body templating engine</cite></li>
<li>Select a QWeb view to be used to render the body field</li>
<li>Apart from QWeb’s standard variables, you also have access to <ttclass="docutils literal">object</tt> and <ttclass="docutils literal">email_template</tt>, which are browse records of the current object and the email template in use, respectively.</li>
<aclass="reference external image-reference"href="https://odoo-community.org"><imgalt="Odoo Community Association"src="https://odoo-community.org/logo.png"/></a>
<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>This module is part of the <aclass="reference external"href="https://github.com/OCA/social/tree/12.0/email_template_qweb">OCA/social</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <aclass="reference external"href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>