modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml
changeset 20500 7331622675df
parent 20373 1150aa0cfdf3
child 28194 9f7684c8be89
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:55 2013 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:27 2013 +0200
@@ -410,7 +410,7 @@
 <!--3522895CB833445F968B548E8333EF47-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
 <!--3522895CB833445F968B548E8333EF47-->  <AD_VAL_RULE_ID><![CDATA[C45CFD74FF5145B0A356E9233D49996F]]></AD_VAL_RULE_ID>
 <!--3522895CB833445F968B548E8333EF47-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
-<!--3522895CB833445F968B548E8333EF47-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT MAX(AD_MODULE_ID) FROM AD_MODULE WHERE ISDEFAULT='Y']]></DEFAULTVALUE>
+<!--3522895CB833445F968B548E8333EF47-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT AD_MODULE_ID FROM AD_REFERENCE WHERE AD_REFERENCE_ID = @AD_Reference_ID@]]></DEFAULTVALUE>
 <!--3522895CB833445F968B548E8333EF47-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--3522895CB833445F968B548E8333EF47-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--3522895CB833445F968B548E8333EF47-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>