[FIX] default expression value may now contains single quotes (but not 3 consecutive ones)

bzr revid: jth@openerp.com-20100927140643-a2qm2mlsc0f42z94
This commit is contained in:
Julien Thewys
2010-09-27 16:06:43 +02:00
parent c36a3d3390
commit 7111a3fe13
+2 -2
View File
@@ -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