Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Mako Templates and CKEditor problem

By
chesucr
on 12/4/14, 5:07 AM 402 views

Hello everybody,

I'm working on mails and mail templates (mako) inside OpenERP. I have a problem when I choose the template and the ckeditor (version 4.3.1) is filled.

If I press the source button first and then I choose the template, the code is loaded fine and everything is working. But when I switch to WYSIWYG view is not working anymore.

When I switch back to the source view something like this happens
http://ckeditor.com/forums/CKEditor-3.x/Preserver-source-code-formatting-protected-source

I tried protecting the source like below, but anyway I get an empty mail:
config.protectedSource.push( /<%[\s\S]*?%>/g );

In my case the code between <% %> is protected but if I write in source view

<% 
set suma = 3+4 
string = "some string"
%>

Login de res.partner: ${object.name}<br />


When I switch back to WYSIWYG this happens

<% 
set suma = 3+4 
string = "some string"
%>Login de res.partner: ${object.name}<br />


And I get an empty mail

Any idea how to solve this?

OpenERP v7.

Thanks in advance.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/4/14, 5:07 AM
Seen: 402 times
Last updated: 3/16/15, 8:10 AM