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.

1

Odoo 8 Modifying Email Templates not parsing variables

By
Alex Ferrer
on 1/29/15, 12:00 AM 1,860 views

Hi,

After modifying in Odoo 8 the Invoice - Send by Email (Portal) template the variable signup_url is not set and the template no longer renders the if statement dependant on this variable.

So when I preview the template everything renders ok except for this part: <% set signup_url = object.get_signup_url() %> % if signup_url:

I can confirm that this happens wiht Odoo 8 online (SAAS) and On-premise

Could you please advise

0
Gray Chen
On 11/17/15, 12:53 PM

I believe that you changed the mail template using the "Edit Template" functionality. If you did do that, you would observe that the variable name part in the template has been URL encoded to "% 24 % 7 B object.signup_url % 7 D" instead of ${object.signup_url}, that is to say, the variable could not be found and the object.get_signup_url() function was never called.

To fix it, click on the "Edit" button to the top-left corner of the interface just below the title "Templates /Odoo Enterprise Connection". Then, click the "<>" button on the tool bar abovethe edit window to show the html source code of the tempalte, and change the variable back to ${object.signup_url} from "% 24 % 7 B object.signup_url % 7 D" .

I meant the variable had been encoded to

${object.signup_url}
. You should change it back to ${object.signup_url}. The URL encode functionality messed up my answer.
Gray Chen
on 11/17/15, 12:56 PM

disregard the previous comment. I had difficult time to enter the actual encoded values. but you can see what I meant from my original answer.

Gray Chen
on 11/17/15, 1:02 PM

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: 1/29/15, 12:00 AM
Seen: 1860 times
Last updated: 11/17/15, 1:01 PM