Community mailing list archives

community@mail.odoo.com

Re: Error rendering email template jinja2 or mako is used ?

by
Mario Arias Badila
- 08/05/2014 22:50:51
Hi Cristian,

When using email templates, it is easier to compute your values before rendering the template, and then passing the results in the context.
Inside the template, you reference them using ctx...

You can check out account_analytic_analysis_cron.xml for a sample...

Regards,
-Mario


On Tue, Aug 5, 2014 at 8:24 PM, Ovnicraft <ovnicraft@gmail.com> wrote:



On Fri, Aug 1, 2014 at 1:18 PM, komsas@gmail.com <komsas@gmail.com> wrote:

Hi,

Check the email_template addon, there is comment about jinja2 and its sanbox.


BTW its hard to cant call formatLang() for date and float type fields.

Regards,

Paulius

Hi to all, i am working on this in 7.0 so i load my template, its so simple

<p>${', '.join([e.name for e in object.exams]) }<p>

in that line i get this error https://gist.github.com/ovnicraft/6725faa2700af8541844

AFAIK mako is used to render mails why is jinja2 in my traceback ?

Any hints around ?

Regards,

--
 
Cristian Salamea on about.me
 
Cristian Salamea
 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
 
Cristian Salamea on about.me
 
Cristian Salamea
 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe