Browse Source

[PEP8] email_template_template

pull/21/head
Sandy Carter 11 years ago
committed by Sandy Carter
parent
commit
d82b1574f6
  1. 9
      email_template_template/__openerp__.py

9
email_template_template/__openerp__.py

@ -77,13 +77,18 @@ And it will be evaluated to
Example city
Example Corp footer
Given the way evaluation works internally (body_text of the template template is evaluated two times, first with the instance of email.template of your own template, then with the object your template refers to), you can do some trickery if you know that a template template is always used with the same kind of model (that is, models that have the same field name):
Given the way evaluation works internally (body_text of the template template
is evaluated two times, first with the instance of email.template of your own
template, then with the object your template refers to), you can do some
trickery if you know that a template template is always used with the same
kind of model (that is, models that have the same field name):
In your template template:
::
Dear ${'${object.name}'}, <-- gets evaluated to "${object.name}" in the first step, then to the content of object.name
Dear ${'${object.name}'}, <-- gets evaluated to "${object.name}" in the
first step, then to the content of object.name
${object.body_html}
Best,
Example Corp

Loading…
Cancel
Save