Fixes Issue 7478: No validation on the default field in Email Template
authorSathiyan Sivaprakasam <sathiyan.sivaprakasam@openbravo.com>
Thu, 25 Jun 2009 21:28:01 +0530
changeset 4065 49a22c0c73fb
parent 4064 79d24670c339
child 4066 61cc1788805c
Fixes Issue 7478: No validation on the default field in Email Template
src-db/database/sourcedata/AD_COLUMN.xml
src/org/openbravo/erpCommon/ad_callouts/SL_IsDefault.java
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 25 16:55:10 2009 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 25 21:28:01 2009 +0530
@@ -237318,6 +237318,7 @@
 <!--1000500068-->  <AD_TABLE_ID><![CDATA[1000500004]]></AD_TABLE_ID>
 <!--1000500068-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
 <!--1000500068-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--1000500068-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
 <!--1000500068-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--1000500068-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--1000500068-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -237331,6 +237332,7 @@
 <!--1000500068-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--1000500068-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1000500068-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1000500068-->  <AD_CALLOUT_ID><![CDATA[1000100000]]></AD_CALLOUT_ID>
 <!--1000500068-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1000500068-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1000500068-->  <POSITION><![CDATA[12]]></POSITION>
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_IsDefault.java	Thu Jun 25 16:55:10 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_IsDefault.java	Thu Jun 25 21:28:01 2009 +0530
@@ -88,7 +88,7 @@
         String currentClause = "";
         // Include parent column if it exists
         if (!parentColumn.equals("") && !parentValue.equals(""))
-          parentClause = "AND " + parentColumn + "=" + parentValue;
+          parentClause = "AND " + parentColumn + "='" + parentValue+"'";
 
         // In case the current record already exists in DB not sum it to
         // the total