From 7111a3fe13b7dce43cab863a833a5108b8af77cf Mon Sep 17 00:00:00 2001 From: Julien Thewys Date: Mon, 27 Sep 2010 16:06:43 +0200 Subject: [PATCH] [FIX] default expression value may now contains single quotes (but not 3 consecutive ones) bzr revid: jth@openerp.com-20100927140643-a2qm2mlsc0f42z94 --- addons/email_template/email_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index f87c4bf750e..cbedc57d6e2 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -351,7 +351,7 @@ This is useful for CRM leads for example"), if sub_model_object_field: copy_val += "." + sub_model_object_field if null_value: - copy_val += " or '" + null_value + "'" + copy_val += " or '''%s'''" % null_value if model_object_field: copy_val += "}" elif template_language == 'django': @@ -360,7 +360,7 @@ This is useful for CRM leads for example"), if sub_model_object_field: copy_val += "." + sub_model_object_field if null_value: - copy_val = copy_val + '|default:"' + null_value + '"' + copy_val = copy_val + "|default:'''%s'''" % null_value copy_val = copy_val + "}}" return copy_val