Fixes issue 12579: There is a combo empty on a filter window
authorSivaraman Rajagopal <sivaraman.rajagopal@openbravo.com>
Fri, 28 May 2010 17:37:58 +0530
changeset 7440 3b31299bcca2
parent 7439 ae79aa325171
child 7450 bb902f4bffd8
Fixes issue 12579: There is a combo empty on a filter window

Validation code has been modified for Transaction Document field in C_ORDER and C_INVOICE tables in order to list values in Transaction Document combo box when no organization is selected. Also, New validation rule has been added for organization field of C_ORDER and C_INVOICE tables in order to remove * from the combo box of filter window. Since C_ORDER and C_INVOICE are also used for Purchase Order and Purchase Invoice respectively, This change will reflect in purchase module also.
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_REF_TABLE.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Fri May 28 10:47:48 2010 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Fri May 28 17:37:58 2010 +0530
@@ -32404,6 +32404,7 @@
 <!--2163-->  <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME>
 <!--2163-->  <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
 <!--2163-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--2163-->  <AD_VAL_RULE_ID><![CDATA[49DC1D6F086945AB82F84C66F5F13F16]]></AD_VAL_RULE_ID>
 <!--2163-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
 <!--2163-->  <DEFAULTVALUE><![CDATA[@#AD_Org_ID@]]></DEFAULTVALUE>
 <!--2163-->  <ISKEY><![CDATA[N]]></ISKEY>
@@ -56539,6 +56540,7 @@
 <!--3486-->  <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME>
 <!--3486-->  <AD_TABLE_ID><![CDATA[318]]></AD_TABLE_ID>
 <!--3486-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--3486-->  <AD_VAL_RULE_ID><![CDATA[49DC1D6F086945AB82F84C66F5F13F16]]></AD_VAL_RULE_ID>
 <!--3486-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
 <!--3486-->  <DEFAULTVALUE><![CDATA[@#AD_Org_ID@]]></DEFAULTVALUE>
 <!--3486-->  <ISKEY><![CDATA[N]]></ISKEY>
--- a/src-db/database/sourcedata/AD_REF_TABLE.xml	Fri May 28 10:47:48 2010 +0200
+++ b/src-db/database/sourcedata/AD_REF_TABLE.xml	Fri May 28 17:37:58 2010 +0530
@@ -1164,7 +1164,7 @@
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <AD_KEY><![CDATA[1501]]></AD_KEY>
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <AD_DISPLAY><![CDATA[1509]]></AD_DISPLAY>
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
-<!--22F546D49D3A48E1B2B4F50446A8DE58-->  <WHERECLAUSE><![CDATA[C_DocType.AD_Client_ID=@#AD_Client_ID@ AND @AD_Org_ID@ <> '0']]></WHERECLAUSE>
+<!--22F546D49D3A48E1B2B4F50446A8DE58-->  <WHERECLAUSE><![CDATA[C_DocType.AD_Client_ID=@#AD_Client_ID@ AND (@AD_Org_ID@ <> '0' OR COALESCE(@AD_Org_ID@,'-1')='-1')]]></WHERECLAUSE>
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <ORDERBYCLAUSE><![CDATA[C_DocType.isdefault DESC, C_DocType.Name]]></ORDERBYCLAUSE>
 <!--22F546D49D3A48E1B2B4F50446A8DE58--></AD_REF_TABLE>
 
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Fri May 28 10:47:48 2010 +0200
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Fri May 28 17:37:58 2010 +0530
@@ -174,7 +174,7 @@
 <!--124-->  <NAME><![CDATA[C_DocType AR/AP Invoices and Credit Memos]]></NAME>
 <!--124-->  <DESCRIPTION><![CDATA[Document Type AR/AP Invoice and Credit Memos]]></DESCRIPTION>
 <!--124-->  <TYPE><![CDATA[S]]></TYPE>
-<!--124-->  <CODE><![CDATA[C_DocType.DocBaseType IN ('ARI', 'API','ARC','APC') AND C_DocType.IsSOTrx='@IsSOTrx@' AND AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1']]></CODE>
+<!--124-->  <CODE><![CDATA[C_DocType.DocBaseType IN ('ARI', 'API','ARC','APC') AND C_DocType.IsSOTrx='@IsSOTrx@' AND (AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1' OR COALESCE(@AD_Org_ID@,'-1')='-1')]]></CODE>
 <!--124-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--124--></AD_VAL_RULE>
 
@@ -277,7 +277,7 @@
 <!--133-->  <NAME><![CDATA[C_DocType PO/SO]]></NAME>
 <!--133-->  <DESCRIPTION><![CDATA[Document Tpe for orders]]></DESCRIPTION>
 <!--133-->  <TYPE><![CDATA[S]]></TYPE>
-<!--133-->  <CODE><![CDATA[C_DocType.DocBaseType IN ('SOO', 'POO') AND C_DocType.IsSOTrx='@IsSOTrx@' AND AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1']]></CODE>
+<!--133-->  <CODE><![CDATA[C_DocType.DocBaseType IN ('SOO', 'POO') AND C_DocType.IsSOTrx='@IsSOTrx@' AND (AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1' OR COALESCE(@AD_Org_ID@,'-1')='-1')]]></CODE>
 <!--133-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--133--></AD_VAL_RULE>
 
@@ -1315,6 +1315,18 @@
 <!--49A6E01F27DB4D83939B1C34180837CC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--49A6E01F27DB4D83939B1C34180837CC--></AD_VAL_RULE>
 
+<!--49DC1D6F086945AB82F84C66F5F13F16--><AD_VAL_RULE>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <AD_VAL_RULE_ID><![CDATA[49DC1D6F086945AB82F84C66F5F13F16]]></AD_VAL_RULE_ID>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <NAME><![CDATA[AD_Org (without *)]]></NAME>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <DESCRIPTION><![CDATA[Organization selection without *]]></DESCRIPTION>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <TYPE><![CDATA[S]]></TYPE>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <CODE><![CDATA[AD_ORG_ID <> '0']]></CODE>
+<!--49DC1D6F086945AB82F84C66F5F13F16-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--49DC1D6F086945AB82F84C66F5F13F16--></AD_VAL_RULE>
+
 <!--4A2C613871134B76899BA0464F3CBF76--><AD_VAL_RULE>
 <!--4A2C613871134B76899BA0464F3CBF76-->  <AD_VAL_RULE_ID><![CDATA[4A2C613871134B76899BA0464F3CBF76]]></AD_VAL_RULE_ID>
 <!--4A2C613871134B76899BA0464F3CBF76-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>