Add missing email_template_qweb addon, and fix bugging mistake in groupe_crm addon description.

This commit is contained in:
Olivier Sarrat 2017-03-22 10:58:25 +01:00
parent 1007fbaedb
commit 719cac234c
20 changed files with 783 additions and 5 deletions

View File

@ -0,0 +1,64 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
========================
QWeb for email templates
========================
This module allows 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.
Usage
=====
To use this module, you need to:
* 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.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/8.0
Demo data contains an example on how to separate corporate identity from a
template's content.
For further information, please visit:
* https://www.odoo.com/forum/help-1
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
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
`here <https://github.com/OCA/server-tools/issues/new?body=module:%20email_template_qweb%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Holger Brunn <hbrunn@therp.nl>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.
To contribute to this module, please visit https://odoo-community.org.

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "QWeb for email templates",
"version": "8.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Marketing",
"summary": "Use the QWeb templating mechanism for emails",
"depends": [
'email_template',
],
"demo": [
"demo/ir_ui_view.xml",
"demo/email_template.xml",
],
"data": [
"views/email_template.xml",
],
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="email_template_demo1" model="email.template">
<field name="name">QWeb demo</field>
<field name="body_type">qweb</field>
<field name="body_view_id" ref="view_email_template_demo1" />
<field name="model_id" ref="base.model_res_users" />
<field name="subject">QWeb demo email</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="view_email_template_corporate_identity">
<body>
<html>
<img style="float: right" t-attf-src="data:image;base64,{{env.user.company_id.logo}}" />
<!-- if some template calling us sets this variable,
we print a h1 tag /-->
<h1 t-if="email_heading"><t t-esc="email_heading" /></h1>
<t t-raw="0" />
<!-- use some standard footer if the user doesn't have
a signature /-->
<footer t-if="not email_use_user_signature">
<p>
<a t-att-href="env.user.company_id.website">
<t t-esc="env.user.company_id.name" />
</a>
</p>
<p><t t-esc="env.user.company_id.phone" /></p>
</footer>
<footer t-if="email_use_user_signature">
<t t-raw="env.user.signature" />
</footer>
</html>
</body>
</template>
<template id="view_email_template_demo1">
<!-- because we can simply call the ci here, we don't need to
repeat it /-->
<t t-call="email_template_qweb.view_email_template_corporate_identity">
<!-- the template we call uses this as title if we set it /-->
<t t-set="email_heading" t-value="email_template.subject" />
<h2>Dear <t t-esc="object.name" />,</h2>
<p>
This is an email template using qweb.
</p>
</t>
</template>
</data>
</openerp>

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-social-8-0/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Plantilles de correu electrònic"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: Danish (http://www.transifex.com/oca/OCA-social-8-0/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Email skabeloner"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-social-8-0/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Email-Vorlagen"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-social-8-0/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Plantillas Correo Electrónico"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Colombia) (http://www.transifex.com/oca/OCA-social-8-0/language/es_CO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es_CO\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Plantilla de E-mails"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
# Christophe CHAUVET <christophe.chauvet@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-30 01:07+0000\n"
"PO-Revision-Date: 2016-06-17 14:28+0000\n"
"Last-Translator: Christophe CHAUVET <christophe.chauvet@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-social-8-0/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr "Modèle de modélisation de corps"
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr "Visualiser le corps"
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr "Cher"
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Modèles de courriel"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr "Jinja2"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr "QWeb"
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr "QWeb courriel de démo"
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr "Ceci est un modèle de mail utilisant QWeb"
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr "Architecture de la vue"
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr "{'invisible': [('body_type', '!=', 'jinja2')]}"

View File

@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-28 14:40+0000\n"
"Last-Translator: <>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-social-8-0/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr ""
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "Modelos de Email"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr ""
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr ""
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr ""
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr ""
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr ""
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr ""

View File

@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_qweb
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2016
msgid ""
msgstr ""
"Project-Id-Version: social (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-30 02:47+0000\n"
"PO-Revision-Date: 2016-04-30 06:14+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-social-8-0/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: email_template_qweb
#: field:email.template,body_type:0
msgid "Body templating engine"
msgstr "Motor za predloge vsebine sporočil"
#. module: email_template_qweb
#: field:email.template,body_view_id:0
msgid "Body view"
msgstr "Prikaz vsebine"
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "Dear"
msgstr "Spoštovani"
#. module: email_template_qweb
#: model:ir.model,name:email_template_qweb.model_email_template
msgid "Email Templates"
msgstr "E-poštne predloge"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "Jinja2"
msgstr "Jinja2"
#. module: email_template_qweb
#: selection:email.template,body_type:0
msgid "QWeb"
msgstr "QWeb"
#. module: email_template_qweb
#: model:email.template,subject:email_template_qweb.email_template_demo1
msgid "QWeb demo email"
msgstr "QWeb demo email"
#. module: email_template_qweb
#: view:website:email_template_qweb.view_email_template_demo1
msgid "This is an email template using qweb."
msgstr "E-poštna predloga z uporabo qweb."
#. module: email_template_qweb
#: field:email.template,body_view_arch:0
msgid "View Architecture"
msgstr "Arhitektura prikaza"
#. module: email_template_qweb
#: view:email.template:email_template_qweb.email_template_form
msgid "{'invisible': [('body_type', '!=', 'jinja2')]}"
msgstr "{'invisible': [('body_type', '!=', 'jinja2')]}"

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import email_template

View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, tools, models
class EmailTemplate(models.Model):
_inherit = 'email.template'
body_type = fields.Selection(
[('jinja2', 'Jinja2'), ('qweb', 'QWeb')], 'Body templating engine',
default='jinja2', required=True)
body_view_id = fields.Many2one(
'ir.ui.view', 'Body view', domain=[('type', '=', 'qweb')])
body_view_arch = fields.Text(related=['body_view_id', 'arch'])
@api.model
def generate_email_batch(self, template_id, res_ids, fields=None):
result = super(EmailTemplate, self).generate_email_batch(
template_id, res_ids, fields=fields)
this = self.browse(template_id)
for record_id, this in self.get_email_template_batch(
template_id, res_ids
).iteritems():
if this.body_type == 'qweb' and\
(not fields or 'body_html' in fields):
for record in self.env[this.model].browse(record_id):
result[record_id]['body_html'] = self.render_post_process(
this.body_view_id.render({
'object': record,
'email_template': this,
})
)
result[record_id]['body'] = tools.html_sanitize(
result[record_id]['body_html']
)
return result

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_email_template_qweb

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
class TestEmailTemplateQweb(TransactionCase):
def test_email_template_qweb(self):
template = self.env.ref('email_template_qweb.email_template_demo1')
mail_values = template.generate_email_batch(
template.id, [self.env.user.id])
self.assertTrue(
# this comes from the called template if everything worked
'<footer>' in mail_values[self.env.user.id]['body_html'])

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="email_template_form" model="ir.ui.view">
<field name="model">email.template</field>
<field name="inherit_id" ref="email_template.email_template_form" />
<field name="arch" type="xml">
<field name="model_id" position="after">
<field name="body_type" />
</field>
<field name="body_html" position="before">
<group attrs="{'invisible': [('body_type', '!=', 'qweb')]}">
<field name="body_view_id" attrs="{'required': [('body_type', '=', 'qweb')]}" />
<field name="body_view_arch" attrs="{'required': [('body_type', '=', 'qweb')], 'invisible': [('body_view_id', '=', False)]}" />
</group>
</field>
<field name="body_html" position="attributes">
<attribute name="attrs">{'invisible': [('body_type', '!=', 'jinja2')]}</attribute>
</field>
</field>
</record>
<record id="email_template_tree" model="ir.ui.view">
<field name="model">email.template</field>
<field name="inherit_id" ref="email_template.email_template_tree" />
<field name="arch" type="xml">
<field name="report_name" position="before">
<field name="body_type" />
</field>
</field>
</record>
</data>
</openerp>

View File

@ -7,9 +7,9 @@
'description': """ 'description': """
- Ajout de champs personnalisés (note 20/02/2017: fait pour les contacts, pas pour les organisations) - Ajout de champs personnalisés (note 20/02/2017: fait pour les contacts, pas pour les organisations)
- Personnalisation des listes daffichage (tri, colonnes, filtres) - Personnalisation des listes daffichage (tri, colonnes, filtres)
- Personnalisation des écrans daffichage des entités : position des champs, organisation par groupe des champs, champs obligatoires/facultatifs - Personnalisation des écrans daffichage des entités : position des champs, organisation par groupe des champs, champs obligatoires/facultatifs
- Masquer les éléments "Clients" et "Pistes" du sous-menu "Ventes" jusqu'à ce que le besoin de suivi de pistes soit remonté - Masquer les éléments "Clients" et "Pistes" du sous-menu "Ventes" jusqu'à ce que le besoin de suivi de pistes soit remonté
Contacts, ajout des champs: Contacts, ajout des champs:
Compte de réseau social (Skype, Twitter, LinkedIn, Facebook), Langue principale, langue(s) secondaires(s), Publications (liste dURL). Compte de réseau social (Skype, Twitter, LinkedIn, Facebook), Langue principale, langue(s) secondaires(s), Publications (liste dURL).
@ -17,8 +17,7 @@
Organisation, ajout des champs: Organisation, ajout des champs:
budget annuel, langue principale, langue(s) secondaire(s), état dadoption de Sigmah (Prise dinformation, Souhait dadoption, Adoption démarrée, Utilisation partielle, Utilisation complète, Non), zone de commentaires. budget annuel, langue principale, langue(s) secondaire(s), état dadoption de Sigmah (Prise dinformation, Souhait dadoption, Adoption démarrée, Utilisation partielle, Utilisation complète, Non), zone de commentaires.
Installation Installation:
============
Aller dans Configuration > Configuration > Ventes pour configuer le module 'web_linkedin' Aller dans Configuration > Configuration > Ventes pour configuer le module 'web_linkedin'
Pour avoir un Mail de rappel pour compléter organisation après opportunité Sigmah gagnée, créer une "Action automatisée" en utilisant le domaine Pour avoir un Mail de rappel pour compléter organisation après opportunité Sigmah gagnée, créer une "Action automatisée" en utilisant le domaine
suivant comme filtre: [('categ_ids.name', '=','Adoption Sigmah'),('stage_id.name','=','Gagné')] suivant comme filtre: [('categ_ids.name', '=','Adoption Sigmah'),('stage_id.name','=','Gagné')]