Merged back to pi extensible reference project
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 11 Feb 2010 12:10:47 +0100
changeset 6242 c15613ebf5ba
parent 6116 e78ef538fa6f (current diff)
parent 6241 e35d1adc4ce2 (diff)
child 6243 38380bfc23f7
child 6373 45db47e0f831
Merged back to pi extensible reference project
.classpath.template
.settings/org.eclipse.wst.common.component.template
src-db/database/model/triggers/AD_REFERENCE_TRG3.xml
--- a/build.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/build.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -638,7 +638,7 @@
     </java>
   </target>
   
-  <target name="apply.modules.compile">
+  <target name="apply.modules.compile" depends="wad.lib">
     <antcall target="apply.modules.compile.simple"/>
     <antcall target="apply.modules.compile.complete"/>
   </target>
--- a/src-db/database/model/functions/AD_LANGUAGE_CREATE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/functions/AD_LANGUAGE_CREATE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -46,6 +46,7 @@
     v_Languages NUMBER:=0;
     v_Created NUMBER:=0;
     v_rowcount NUMBER;
+    v_count NUMBER;
   BEGIN
     --  Update AD_PInstance
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_PInstance_ID) ;
@@ -606,6 +607,38 @@
     v_rowcount:=SQL%ROWCOUNT;
     v_Created:=v_Created + v_rowcount;
     DBMS_OUTPUT.PUT_LINE('- AD_TextInterfaces ' || v_rowcount) ;
+
+    -- Call extension points
+    SELECT count(*) INTO v_count
+    FROM DUAL
+    WHERE EXISTS (SELECT 1 FROM AD_EP_PROCEDURES WHERE AD_EXTENSION_POINTS_ID= 'C485210A6F754FE0A6E32FA24B3B243C');
+    IF (v_count=1) THEN 
+	DECLARE
+	  v_ep_instance VARCHAR(32);
+	  v_extension_point_id VARCHAR(32) := 'C485210A6F754FE0A6E32FA24B3B243C';
+	BEGIN
+	  v_ep_instance := get_uuid();	 
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'p_PInstance_ID', p_PInstance_ID, NULL, NULL, NULL, NULL, NULL, NULL);	  
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'User', v_AD_User_ID, NULL, NULL, NULL, NULL, NULL, NULL);
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'Message', NULL, NULL, NULL, NULL, NULL, NULL, v_Message);
+      AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'Result', NULL, NULL, v_result, NULL, NULL, NULL, NULL);
+	  AD_EXTENSION_POINT_HANDLER(v_ep_instance, v_extension_point_id);
+
+	  SELECT p_number INTO v_Result
+	    FROM ad_ep_instance_para
+	    WHERE ad_ep_instance_id = v_ep_instance
+	      AND parametername = 'Result';
+	  
+	  SELECT p_text INTO v_Message
+	    FROM ad_ep_instance_para
+	    WHERE ad_ep_instance_id = v_ep_instance
+	      AND parametername = 'Message';
+	 
+	  DELETE FROM ad_ep_instance_para WHERE ad_ep_instance_id = v_ep_instance;
+	END;
+
+    END IF; 
+
     -- Summary info
     v_Message:='@Created@ = ' || v_Created;
     -- Commented by cromero 19102006 COMMIT;
--- a/src-db/database/model/functions/AD_SYNCHRONIZE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/functions/AD_SYNCHRONIZE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -46,6 +46,7 @@
     Cur_Parameter RECORD;
     -- Parameter Variables
     v_rowcount NUMBER;
+    v_count NUMBER;
   BEGIN
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
@@ -1595,6 +1596,38 @@
       ;
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  trl rows updated: ' || v_rowcount) ;
+
+    -- Call extension points
+    SELECT count(*) INTO v_count
+    FROM DUAL
+    WHERE EXISTS (SELECT 1 FROM AD_EP_PROCEDURES WHERE AD_EXTENSION_POINTS_ID= '1C3043156C334398AA114F7E0AB6A18B');
+    IF (v_count=1) THEN 
+	DECLARE
+	  v_ep_instance VARCHAR(32);
+	  v_extension_point_id VARCHAR(32) := '1C3043156C334398AA114F7E0AB6A18B';
+	BEGIN
+	  v_ep_instance := get_uuid();	 
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'p_PInstance_ID', p_PInstance_ID, NULL, NULL, NULL, NULL, NULL, NULL);	  
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'User', v_AD_User_ID, NULL, NULL, NULL, NULL, NULL, NULL);
+	  AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'Message', NULL, NULL, NULL, NULL, NULL, NULL, v_Message);
+          AD_EP_INSTANCE_PARA_INSERT(v_ep_instance, v_extension_point_id, 'Result', NULL, NULL, v_result, NULL, NULL, NULL, NULL);
+	  AD_EXTENSION_POINT_HANDLER(v_ep_instance, v_extension_point_id);
+
+	  SELECT p_number INTO v_Result
+	    FROM ad_ep_instance_para
+	    WHERE ad_ep_instance_id = v_ep_instance
+	    AND parametername = 'Result';
+
+	  SELECT p_text INTO v_Message
+	    FROM ad_ep_instance_para
+	    WHERE ad_ep_instance_id = v_ep_instance
+	      AND parametername = 'Message';
+	 
+	  DELETE FROM ad_ep_instance_para WHERE ad_ep_instance_id = v_ep_instance;
+	END;
+
+    END IF; 
+
     --<<FINISH_PROCESS>>
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
--- a/src-db/database/model/postscript-Oracle.sql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/postscript-Oracle.sql	Thu Feb 11 12:10:47 2010 +0100
@@ -845,6 +845,12 @@
 END;
 /-- END
 
+--update parent reference for old modules
+update ad_reference
+   set parentreference_id =( CASE VALIDATIONTYPE WHEN 'S' THEN '30' WHEN 'L' THEN '17' WHEN 'T' THEN '18' end)
+   where validationtype in ('S','L','T')
+   and parentreference_id is null
+/-- END
 
 CALL DBA_RECOMPILE(NULL)
 /-- END
--- a/src-db/database/model/postscript-PostgreSql.sql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/postscript-PostgreSql.sql	Thu Feb 11 12:10:47 2010 +0100
@@ -638,3 +638,11 @@
   LANGUAGE 'plpgsql' VOLATILE;
 SELECT pg_temp.insert_register_form_access();
 /-- END
+
+--update parent reference for old modules
+update ad_reference
+   set parentreference_id =( CASE VALIDATIONTYPE WHEN 'S' THEN '30' WHEN 'L' THEN '17' WHEN 'T' THEN '18' end)
+   where validationtype in ('S','L','T')
+   and parentreference_id is null;
+/-- END
+ 
--- a/src-db/database/model/tables/AD_REFERENCE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/tables/AD_REFERENCE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -45,7 +45,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="VALIDATIONTYPE" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+      <column name="VALIDATIONTYPE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -57,6 +57,26 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault><![CDATA[SELECT AD_MODULE_ID FROM AD_MODULE WHERE AD_MODULE_ID<>'0' AND TYPE='M']]></onCreateDefault>
       </column>
+      <column name="ISBASEREFERENCE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA[CASE WHEN VALIDATIONTYPE='D' THEN 'Y' ELSE 'N' END]]></onCreateDefault>
+      </column>
+      <column name="PARENTREFERENCE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault><![CDATA[CASE VALIDATIONTYPE WHEN 'S' THEN '30' WHEN 'L' THEN '17' WHEN 'T' THEN '18' ELSE NULL END]]></onCreateDefault>
+      </column>
+      <column name="MODEL_IMPL" primaryKey="false" required="false" type="VARCHAR" size="300" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="WAD_IMPL" primaryKey="false" required="false" type="VARCHAR" size="300" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UI_IMPL" primaryKey="false" required="false" type="VARCHAR" size="300" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_REFERENCE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -66,6 +86,9 @@
       <foreign-key foreignTable="AD_ORG" name="AD_REFERENCE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_REFERENCE" name="AD_REFERENCE_AD_REFERENCE">
+        <reference local="PARENTREFERENCE_ID" foreign="AD_REFERENCE_ID"/>
+      </foreign-key>
       <unique name="AD_REFERENCE_NAME">
         <unique-column name="NAME"/>
         <unique-column name="AD_MODULE_ID"/>
--- a/src-db/database/model/triggers/AD_REFERENCE_MOD_TRG.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/triggers/AD_REFERENCE_MOD_TRG.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -72,10 +72,13 @@
         COALESCE(:NEW.Name , '.') != COALESCE(:OLD.Name , '.') OR
         COALESCE(:NEW.Description , '.') != COALESCE(:OLD.Description , '.') OR
         COALESCE(:NEW.Help , '.') != COALESCE(:OLD.Help , '.') OR
-        COALESCE(:NEW.ValidationType , '.') != COALESCE(:OLD.ValidationType , '.') OR
         COALESCE(:NEW.VFormat , '.') != COALESCE(:OLD.VFormat , '.') OR
         COALESCE(:NEW.AD_Module_ID , '.') != COALESCE(:OLD.AD_Module_ID , '.') OR
-        1=2) THEN
+        :NEW.ISBASEREFERENCE      != :NEW.ISBASEREFERENCE                        OR                                                                                                                      
+        COALESCE(:NEW.PARENTREFERENCE_ID,'.')   != COALESCE(:NEW.PARENTREFERENCE_ID,'.') OR                                                                                                                                                  
+        COALESCE(:NEW.MODEL_IMPL        ,'.')   != COALESCE(:NEW.MODEL_IMPL        ,'.') OR                                                                                                                                                  
+        COALESCE(:NEW.WAD_IMPL          ,'.')   != COALESCE(:NEW.WAD_IMPL          ,'.') OR                                                                                                                                                  
+        COALESCE(:NEW.UI_IMPL           ,'.')   != COALESCE(:NEW.UI_IMPL           ,'.')) THEN
       RAISE_APPLICATION_ERROR(-20532, 'Cannot update an object in a module not in developement and without an active template');
     END IF;
   END IF;
@@ -83,6 +86,13 @@
   IF ((DELETING OR INSERTING) AND devModule='N') THEN
     RAISE_APPLICATION_ERROR(-20533, 'Cannot insert/delete objects in a module not in development.');
   END IF;
+
+  IF (UPDATING OR INSERTING) THEN
+    IF :NEW.ISBASEREFERENCE = 'N' AND :NEW.PARENTREFERENCE_ID IS NULL THEN
+        RAISE_APPLICATION_ERROR(-20000, '@IF_NOT_BASE_THEN_PARENT_MANDATORY@');
+    END IF;
+  END IF;
+
 END AD_REFERENCE_MOD_TRG
 ]]></body>
     </trigger>
--- a/src-db/database/model/triggers/AD_REFERENCE_TRG2.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/model/triggers/AD_REFERENCE_TRG2.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="TRIGGER AD_REFERENCE_TRG2">
-    <trigger name="AD_REFERENCE_TRG2" table="AD_REFERENCE" fires="after" insert="true" update="true" delete="true" foreach="row">
+    <trigger name="AD_REFERENCE_TRG2" table="AD_REFERENCE" fires="after" insert="true" update="false" delete="true" foreach="row">
       <body><![CDATA[
 
 
@@ -32,18 +32,8 @@
     IF AD_isTriggerEnabled()='N' THEN RETURN;
     END IF;
 
-
-  IF (UPDATING) THEN
-    IF NOT((COALESCE(:old.NAME,'.')<>COALESCE(:NEW.NAME,'.')
-   OR COALESCE(:old.VALIDATIONTYPE,'.')<>COALESCE(:NEW.VALIDATIONTYPE,'.')
-   OR COALESCE(:old.IsActive,'.')<>COALESCE(:NEW.IsActive,'.')))
-  THEN
-      RETURN;
-    END IF;
-  END IF;
-
  IF (DELETING) THEN
-  IF :OLD.VALIDATIONTYPE='S' AND :OLD.ISACTIVE='Y' THEN
+  IF :OLD.PARENTREFERENCE_ID='30' AND :OLD.ISACTIVE='Y' THEN
    DELETE FROM AD_MODEL_OBJECT_MAPPING WHERE AD_MODEL_OBJECT_ID IN (
       SELECT AD_MODEL_OBJECT_ID FROM AD_MODEL_OBJECT WHERE AD_MODEL_OBJECT.AD_REFERENCE_ID=:old.AD_REFERENCE_ID AND ACTION = 'S');
    DELETE FROM AD_MODEL_OBJECT WHERE ACTION = 'S' AND AD_MODEL_OBJECT.AD_REFERENCE_ID = :OLD.AD_REFERENCE_ID;
@@ -51,7 +41,7 @@
  END IF;
 
  IF (INSERTING) THEN
-  IF :NEW.VALIDATIONTYPE='S' AND :NEW.ISACTIVE='Y' THEN
+  IF :NEW.PARENTREFERENCE_ID='30' AND :NEW.ISACTIVE='Y' THEN
     IF :new.AD_Module_ID != '0' THEN
       SELECT ad_mapping_format(javapackage||'.info')
         INTO v_javapackage
--- a/src-db/database/model/triggers/AD_REFERENCE_TRG3.xml	Thu Feb 11 09:08:54 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER AD_REFERENCE_TRG3">
-    <trigger name="AD_REFERENCE_TRG3" table="AD_REFERENCE" fires="before" insert="true" update="true" delete="false" foreach="row">
-      <body><![CDATA[
-
-
-
-
-/*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License.
-* The Original Code is Openbravo ERP.
-* The Initial Developer of the Original Code is Openbravo SL
-* All portions are Copyright (C) 2008 Openbravo SL
-* All Rights Reserved.
-* Contributor(s):  ______________________________________.
-************************************************************************/
- 
-    
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-
- IF :new.AD_Module_ID != '0' AND :new.ValidationType = 'D' THEN
-    RAISE_APPLICATION_ERROR(-20535, 'New datatype references are not allowed in modules.');
- END IF;
-END AD_REFERENCE_TRG3
-]]></body>
-    </trigger>
-  </database>
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -1332,6 +1332,17 @@
 <!--A81DE6745CD547F088CCCA4A27E4B117-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--A81DE6745CD547F088CCCA4A27E4B117--></AD_AUXILIARINPUT>
 
+<!--A8809D1BBF65445DA5DEE3150ABB521C--><AD_AUXILIARINPUT>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <AD_AUXILIARINPUT_ID><![CDATA[A8809D1BBF65445DA5DEE3150ABB521C]]></AD_AUXILIARINPUT_ID>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <AD_TAB_ID><![CDATA[101]]></AD_TAB_ID>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <NAME><![CDATA[IsBaseRef]]></NAME>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <CODE><![CDATA[@SQL=SELECT isbasereference FROM ad_reference WHERE ad_reference_id = @AD_Reference_ID@]]></CODE>
+<!--A8809D1BBF65445DA5DEE3150ABB521C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A8809D1BBF65445DA5DEE3150ABB521C--></AD_AUXILIARINPUT>
+
 <!--A937C82DEBEF4A5A998C89372C02915A--><AD_AUXILIARINPUT>
 <!--A937C82DEBEF4A5A998C89372C02915A-->  <AD_AUXILIARINPUT_ID><![CDATA[A937C82DEBEF4A5A998C89372C02915A]]></AD_AUXILIARINPUT_ID>
 <!--A937C82DEBEF4A5A998C89372C02915A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -802,9 +802,9 @@
 <!--139-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
 <!--139-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--139-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--139-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--139-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--139-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--139-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
+<!--139-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--139-->  <SEQNO><![CDATA[2]]></SEQNO>
 <!--139-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--139-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -813,7 +813,7 @@
 <!--139-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--139-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--139-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--139-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--139-->  <DEVELOPMENTSTATUS><![CDATA[DP]]></DEVELOPMENTSTATUS>
 <!--139-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--139-->  <POSITION><![CDATA[12]]></POSITION>
 <!--139-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
@@ -267265,6 +267265,163 @@
 <!--7555569CC84A010FE040007F01010B4D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--7555569CC84A010FE040007F01010B4D--></AD_COLUMN>
 
+<!--79957912A86EC7D8E040007F010156EE--><AD_COLUMN>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_COLUMN_ID><![CDATA[79957912A86EC7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A86EC7D8E040007F010156EE-->  <NAME><![CDATA[IsBaseReference]]></NAME>
+<!--79957912A86EC7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Base Reference]]></DESCRIPTION>
+<!--79957912A86EC7D8E040007F010156EE-->  <HELP><![CDATA[Base References are the ones that can be directly applied to a column. Base references can define subreferences.]]></HELP>
+<!--79957912A86EC7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[IsBaseReference]]></COLUMNNAME>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_TABLE_ID><![CDATA[102]]></AD_TABLE_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--79957912A86EC7D8E040007F010156EE-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--79957912A86EC7D8E040007F010156EE-->  <SEQNO><![CDATA[22]]></SEQNO>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISSELECTIONCOLUMN><![CDATA[Y]]></ISSELECTIONCOLUMN>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A874C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--79957912A86EC7D8E040007F010156EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--79957912A86EC7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A86EC7D8E040007F010156EE-->  <POSITION><![CDATA[15]]></POSITION>
+<!--79957912A86EC7D8E040007F010156EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--79957912A86EC7D8E040007F010156EE--></AD_COLUMN>
+
+<!--79957912A86FC7D8E040007F010156EE--><AD_COLUMN>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_COLUMN_ID><![CDATA[79957912A86FC7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A86FC7D8E040007F010156EE-->  <NAME><![CDATA[ParentReference_ID]]></NAME>
+<!--79957912A86FC7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Subreference's parent reference]]></DESCRIPTION>
+<!--79957912A86FC7D8E040007F010156EE-->  <HELP><![CDATA[When the reference is set as non base reference, it is necessary to indicate which is its parent reference. ]]></HELP>
+<!--79957912A86FC7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[ParentReference_ID]]></COLUMNNAME>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_TABLE_ID><![CDATA[102]]></AD_TABLE_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_REFERENCE_VALUE_ID><![CDATA[1]]></AD_REFERENCE_VALUE_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--79957912A86FC7D8E040007F010156EE-->  <SEQNO><![CDATA[32]]></SEQNO>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISSELECTIONCOLUMN><![CDATA[Y]]></ISSELECTIONCOLUMN>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A875C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--79957912A86FC7D8E040007F010156EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--79957912A86FC7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A86FC7D8E040007F010156EE-->  <POSITION><![CDATA[16]]></POSITION>
+<!--79957912A86FC7D8E040007F010156EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--79957912A86FC7D8E040007F010156EE--></AD_COLUMN>
+
+<!--79957912A870C7D8E040007F010156EE--><AD_COLUMN>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_COLUMN_ID><![CDATA[79957912A870C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A870C7D8E040007F010156EE-->  <NAME><![CDATA[Model_Impl]]></NAME>
+<!--79957912A870C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing Model.]]></DESCRIPTION>
+<!--79957912A870C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing Model. It is the java class used to generate DAL classes.]]></HELP>
+<!--79957912A870C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[Model_Impl]]></COLUMNNAME>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_TABLE_ID><![CDATA[102]]></AD_TABLE_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <FIELDLENGTH><![CDATA[300]]></FIELDLENGTH>
+<!--79957912A870C7D8E040007F010156EE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--79957912A870C7D8E040007F010156EE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--79957912A870C7D8E040007F010156EE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--79957912A870C7D8E040007F010156EE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--79957912A870C7D8E040007F010156EE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--79957912A870C7D8E040007F010156EE-->  <SEQNO><![CDATA[42]]></SEQNO>
+<!--79957912A870C7D8E040007F010156EE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--79957912A870C7D8E040007F010156EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79957912A870C7D8E040007F010156EE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A877C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--79957912A870C7D8E040007F010156EE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--79957912A870C7D8E040007F010156EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--79957912A870C7D8E040007F010156EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--79957912A870C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A870C7D8E040007F010156EE-->  <POSITION><![CDATA[17]]></POSITION>
+<!--79957912A870C7D8E040007F010156EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--79957912A870C7D8E040007F010156EE--></AD_COLUMN>
+
+<!--79957912A871C7D8E040007F010156EE--><AD_COLUMN>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_COLUMN_ID><![CDATA[79957912A871C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A871C7D8E040007F010156EE-->  <NAME><![CDATA[WAD_Impl]]></NAME>
+<!--79957912A871C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing WAD]]></DESCRIPTION>
+<!--79957912A871C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing WAD]]></HELP>
+<!--79957912A871C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[WAD_Impl]]></COLUMNNAME>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_TABLE_ID><![CDATA[102]]></AD_TABLE_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <FIELDLENGTH><![CDATA[300]]></FIELDLENGTH>
+<!--79957912A871C7D8E040007F010156EE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--79957912A871C7D8E040007F010156EE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--79957912A871C7D8E040007F010156EE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--79957912A871C7D8E040007F010156EE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--79957912A871C7D8E040007F010156EE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--79957912A871C7D8E040007F010156EE-->  <SEQNO><![CDATA[52]]></SEQNO>
+<!--79957912A871C7D8E040007F010156EE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--79957912A871C7D8E040007F010156EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79957912A871C7D8E040007F010156EE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A876C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--79957912A871C7D8E040007F010156EE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--79957912A871C7D8E040007F010156EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--79957912A871C7D8E040007F010156EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--79957912A871C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A871C7D8E040007F010156EE-->  <POSITION><![CDATA[18]]></POSITION>
+<!--79957912A871C7D8E040007F010156EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--79957912A871C7D8E040007F010156EE--></AD_COLUMN>
+
+<!--79957912A872C7D8E040007F010156EE--><AD_COLUMN>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_COLUMN_ID><![CDATA[79957912A872C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A872C7D8E040007F010156EE-->  <NAME><![CDATA[UI_Impl]]></NAME>
+<!--79957912A872C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing runtime UI.]]></DESCRIPTION>
+<!--79957912A872C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing runtime UI.]]></HELP>
+<!--79957912A872C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[UI_Impl]]></COLUMNNAME>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_TABLE_ID><![CDATA[102]]></AD_TABLE_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <FIELDLENGTH><![CDATA[300]]></FIELDLENGTH>
+<!--79957912A872C7D8E040007F010156EE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--79957912A872C7D8E040007F010156EE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--79957912A872C7D8E040007F010156EE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--79957912A872C7D8E040007F010156EE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--79957912A872C7D8E040007F010156EE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--79957912A872C7D8E040007F010156EE-->  <SEQNO><![CDATA[62]]></SEQNO>
+<!--79957912A872C7D8E040007F010156EE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--79957912A872C7D8E040007F010156EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79957912A872C7D8E040007F010156EE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A873C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--79957912A872C7D8E040007F010156EE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--79957912A872C7D8E040007F010156EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--79957912A872C7D8E040007F010156EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--79957912A872C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A872C7D8E040007F010156EE-->  <POSITION><![CDATA[19]]></POSITION>
+<!--79957912A872C7D8E040007F010156EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--79957912A872C7D8E040007F010156EE--></AD_COLUMN>
+
 <!--7AD1D1A49C5D11DD9476001B388C05F0--><AD_COLUMN>
 <!--7AD1D1A49C5D11DD9476001B388C05F0-->  <AD_COLUMN_ID><![CDATA[7AD1D1A49C5D11DD9476001B388C05F0]]></AD_COLUMN_ID>
 <!--7AD1D1A49C5D11DD9476001B388C05F0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -24870,6 +24870,71 @@
 <!--7555569CC84B010FE040007F01010B4D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7555569CC84B010FE040007F01010B4D--></AD_ELEMENT>
 
+<!--79957912A873C7D8E040007F010156EE--><AD_ELEMENT>
+<!--79957912A873C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A873C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A873C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A873C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A873C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A873C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[UI_Impl]]></COLUMNNAME>
+<!--79957912A873C7D8E040007F010156EE-->  <NAME><![CDATA[Runtime UI Implementation]]></NAME>
+<!--79957912A873C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Runtime UI Implementation]]></PRINTNAME>
+<!--79957912A873C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing runtime UI.]]></DESCRIPTION>
+<!--79957912A873C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing runtime UI.]]></HELP>
+<!--79957912A873C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A873C7D8E040007F010156EE--></AD_ELEMENT>
+
+<!--79957912A874C7D8E040007F010156EE--><AD_ELEMENT>
+<!--79957912A874C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A874C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A874C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A874C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A874C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A874C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[IsBaseReference]]></COLUMNNAME>
+<!--79957912A874C7D8E040007F010156EE-->  <NAME><![CDATA[Base Reference]]></NAME>
+<!--79957912A874C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Base Reference]]></PRINTNAME>
+<!--79957912A874C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Base Reference]]></DESCRIPTION>
+<!--79957912A874C7D8E040007F010156EE-->  <HELP><![CDATA[Base References are the ones that can be directly applied to a column. Base references can define subreferences.]]></HELP>
+<!--79957912A874C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A874C7D8E040007F010156EE--></AD_ELEMENT>
+
+<!--79957912A875C7D8E040007F010156EE--><AD_ELEMENT>
+<!--79957912A875C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A875C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A875C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A875C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A875C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A875C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[ParentReference_ID]]></COLUMNNAME>
+<!--79957912A875C7D8E040007F010156EE-->  <NAME><![CDATA[Parent Reference]]></NAME>
+<!--79957912A875C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Parent Reference]]></PRINTNAME>
+<!--79957912A875C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Subreference's parent reference]]></DESCRIPTION>
+<!--79957912A875C7D8E040007F010156EE-->  <HELP><![CDATA[When the reference is set as non base reference, it is necessary to indicate which is its parent reference. ]]></HELP>
+<!--79957912A875C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A875C7D8E040007F010156EE--></AD_ELEMENT>
+
+<!--79957912A876C7D8E040007F010156EE--><AD_ELEMENT>
+<!--79957912A876C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A876C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A876C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A876C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A876C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A876C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[WAD_Impl]]></COLUMNNAME>
+<!--79957912A876C7D8E040007F010156EE-->  <NAME><![CDATA[WAD Implementation]]></NAME>
+<!--79957912A876C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[WAD Implementation]]></PRINTNAME>
+<!--79957912A876C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing WAD]]></DESCRIPTION>
+<!--79957912A876C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing WAD]]></HELP>
+<!--79957912A876C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A876C7D8E040007F010156EE--></AD_ELEMENT>
+
+<!--79957912A877C7D8E040007F010156EE--><AD_ELEMENT>
+<!--79957912A877C7D8E040007F010156EE-->  <AD_ELEMENT_ID><![CDATA[79957912A877C7D8E040007F010156EE]]></AD_ELEMENT_ID>
+<!--79957912A877C7D8E040007F010156EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79957912A877C7D8E040007F010156EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79957912A877C7D8E040007F010156EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79957912A877C7D8E040007F010156EE-->  <COLUMNNAME><![CDATA[Model_Impl]]></COLUMNNAME>
+<!--79957912A877C7D8E040007F010156EE-->  <NAME><![CDATA[Model Implememtation]]></NAME>
+<!--79957912A877C7D8E040007F010156EE-->  <PRINTNAME><![CDATA[Model Implememtation]]></PRINTNAME>
+<!--79957912A877C7D8E040007F010156EE-->  <DESCRIPTION><![CDATA[Java class implementing Model.]]></DESCRIPTION>
+<!--79957912A877C7D8E040007F010156EE-->  <HELP><![CDATA[Java class implementing Model. It is the java class used to generate DAL classes.]]></HELP>
+<!--79957912A877C7D8E040007F010156EE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79957912A877C7D8E040007F010156EE--></AD_ELEMENT>
+
 <!--7C152B5C9EBC4E74B75C469A8A473D34--><AD_ELEMENT>
 <!--7C152B5C9EBC4E74B75C469A8A473D34-->  <AD_ELEMENT_ID><![CDATA[7C152B5C9EBC4E74B75C469A8A473D34]]></AD_ELEMENT_ID>
 <!--7C152B5C9EBC4E74B75C469A8A473D34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_EXTENSION_POINTS.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_EXTENSION_POINTS.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -1,5 +1,25 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--1C3043156C334398AA114F7E0AB6A18B--><AD_EXTENSION_POINTS>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <AD_EXTENSION_POINTS_ID><![CDATA[1C3043156C334398AA114F7E0AB6A18B]]></AD_EXTENSION_POINTS_ID>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <NAME><![CDATA[Synchronize Terminology Extension]]></NAME>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <DESCRIPTION><![CDATA[Extension point called at the end of synchronize terminology, the p_PInstance_ID and User parameter are passed in, Message and Result can be used to pass results back.]]></DESCRIPTION>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1C3043156C334398AA114F7E0AB6A18B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1C3043156C334398AA114F7E0AB6A18B--></AD_EXTENSION_POINTS>
+
+<!--C485210A6F754FE0A6E32FA24B3B243C--><AD_EXTENSION_POINTS>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <AD_EXTENSION_POINTS_ID><![CDATA[C485210A6F754FE0A6E32FA24B3B243C]]></AD_EXTENSION_POINTS_ID>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <NAME><![CDATA[Create Language Extension Point]]></NAME>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <DESCRIPTION><![CDATA[Is called at the end of the ad_language_create stored procedure, the p_PInstance_ID and User is passed in as a parameter, Message and Result can be used to pass results back.]]></DESCRIPTION>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C485210A6F754FE0A6E32FA24B3B243C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C485210A6F754FE0A6E32FA24B3B243C--></AD_EXTENSION_POINTS>
+
 <!--CB68FC0E8A4547D9943C785761977E77--><AD_EXTENSION_POINTS>
 <!--CB68FC0E8A4547D9943C785761977E77-->  <AD_EXTENSION_POINTS_ID><![CDATA[CB68FC0E8A4547D9943C785761977E77]]></AD_EXTENSION_POINTS_ID>
 <!--CB68FC0E8A4547D9943C785761977E77-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -1282,7 +1282,7 @@
 <!--171-->  <AD_TAB_ID><![CDATA[101]]></AD_TAB_ID>
 <!--171-->  <AD_COLUMN_ID><![CDATA[227]]></AD_COLUMN_ID>
 <!--171-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--171-->  <DISPLAYLOGIC><![CDATA[@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28]]></DISPLAYLOGIC>
+<!--171-->  <DISPLAYLOGIC><![CDATA[@IsBaseRef@='Y']]></DISPLAYLOGIC>
 <!--171-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--171-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--171-->  <SEQNO><![CDATA[160]]></SEQNO>
@@ -1329,10 +1329,9 @@
 <!--178-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--178-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
 <!--178-->  <AD_COLUMN_ID><![CDATA[139]]></AD_COLUMN_ID>
-<!--178-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--178-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--178-->  <DISPLAYLENGTH><![CDATA[21]]></DISPLAYLENGTH>
 <!--178-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--178-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--178-->  <SORTNO><![CDATA[1]]></SORTNO>
 <!--178-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--178-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -1354,7 +1353,7 @@
 <!--179-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--179-->  <AD_COLUMN_ID><![CDATA[142]]></AD_COLUMN_ID>
 <!--179-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--179-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--179-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--179-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--179-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--179-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -1378,7 +1377,7 @@
 <!--180-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--180-->  <AD_COLUMN_ID><![CDATA[143]]></AD_COLUMN_ID>
 <!--180-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--180-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--180-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--180-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--180-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--180-->  <SEQNO><![CDATA[40]]></SEQNO>
@@ -1403,7 +1402,7 @@
 <!--181-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--181-->  <AD_COLUMN_ID><![CDATA[144]]></AD_COLUMN_ID>
 <!--181-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--181-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--181-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--181-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--181-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--181-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -1427,7 +1426,7 @@
 <!--182-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--182-->  <AD_COLUMN_ID><![CDATA[145]]></AD_COLUMN_ID>
 <!--182-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--182-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--182-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--182-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--182-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--182-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -1451,7 +1450,7 @@
 <!--183-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--183-->  <AD_COLUMN_ID><![CDATA[146]]></AD_COLUMN_ID>
 <!--183-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--183-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--183-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--183-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--183-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--183-->  <SEQNO><![CDATA[100]]></SEQNO>
@@ -1475,7 +1474,7 @@
 <!--184-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--184-->  <AD_COLUMN_ID><![CDATA[147]]></AD_COLUMN_ID>
 <!--184-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--184-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--184-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--184-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--184-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--184-->  <SEQNO><![CDATA[110]]></SEQNO>
@@ -1499,7 +1498,7 @@
 <!--185-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--185-->  <AD_COLUMN_ID><![CDATA[151]]></AD_COLUMN_ID>
 <!--185-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--185-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--185-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--185-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--185-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--185-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -1523,7 +1522,7 @@
 <!--186-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--186-->  <AD_COLUMN_ID><![CDATA[148]]></AD_COLUMN_ID>
 <!--186-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
-<!--186-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--186-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--186-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--186-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--186-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
@@ -1548,7 +1547,7 @@
 <!--187-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--187-->  <AD_COLUMN_ID><![CDATA[200]]></AD_COLUMN_ID>
 <!--187-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--187-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--187-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--187-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--187-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--187-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -1573,7 +1572,7 @@
 <!--188-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--188-->  <AD_COLUMN_ID><![CDATA[149]]></AD_COLUMN_ID>
 <!--188-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--188-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--188-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--188-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--188-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--188-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -1597,7 +1596,7 @@
 <!--189-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--189-->  <AD_COLUMN_ID><![CDATA[152]]></AD_COLUMN_ID>
 <!--189-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--189-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--189-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--189-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--189-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--189-->  <SEQNO><![CDATA[90]]></SEQNO>
@@ -1621,7 +1620,7 @@
 <!--190-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--190-->  <AD_COLUMN_ID><![CDATA[153]]></AD_COLUMN_ID>
 <!--190-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--190-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--190-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--190-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--190-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--190-->  <SEQNO><![CDATA[100]]></SEQNO>
@@ -1645,7 +1644,7 @@
 <!--192-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--192-->  <AD_COLUMN_ID><![CDATA[150]]></AD_COLUMN_ID>
 <!--192-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--192-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--192-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--192-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--192-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--192-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -2886,7 +2885,7 @@
 <!--260-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--260-->  <AD_COLUMN_ID><![CDATA[558]]></AD_COLUMN_ID>
 <!--260-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--260-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--260-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--260-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--260-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--260-->  <SEQNO><![CDATA[80]]></SEQNO>
@@ -2910,7 +2909,7 @@
 <!--261-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--261-->  <AD_COLUMN_ID><![CDATA[367]]></AD_COLUMN_ID>
 <!--261-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--261-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--261-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--261-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--261-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--261-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -2936,7 +2935,7 @@
 <!--264-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--264-->  <AD_COLUMN_ID><![CDATA[563]]></AD_COLUMN_ID>
 <!--264-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--264-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--264-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--264-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--264-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--264-->  <SEQNO><![CDATA[80]]></SEQNO>
@@ -2960,7 +2959,7 @@
 <!--265-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--265-->  <AD_COLUMN_ID><![CDATA[371]]></AD_COLUMN_ID>
 <!--265-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--265-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--265-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--265-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--265-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--265-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -3654,10 +3653,10 @@
 <!--314-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
 <!--314-->  <AD_COLUMN_ID><![CDATA[1180]]></AD_COLUMN_ID>
 <!--314-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--314-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--314-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--314-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--314-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--314-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--314-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--314-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--314-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--314-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -11394,7 +11393,7 @@
 <!--952-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--952-->  <AD_COLUMN_ID><![CDATA[1215]]></AD_COLUMN_ID>
 <!--952-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--952-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--952-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--952-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--952-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--952-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -11420,7 +11419,7 @@
 <!--953-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--953-->  <AD_COLUMN_ID><![CDATA[706]]></AD_COLUMN_ID>
 <!--953-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--953-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--953-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--953-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--953-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--953-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -11444,7 +11443,7 @@
 <!--954-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--954-->  <AD_COLUMN_ID><![CDATA[336]]></AD_COLUMN_ID>
 <!--954-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--954-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--954-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--954-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--954-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--954-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -11468,7 +11467,7 @@
 <!--955-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--955-->  <AD_COLUMN_ID><![CDATA[337]]></AD_COLUMN_ID>
 <!--955-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--955-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--955-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--955-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--955-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--955-->  <SEQNO><![CDATA[40]]></SEQNO>
@@ -11492,7 +11491,7 @@
 <!--956-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--956-->  <AD_COLUMN_ID><![CDATA[338]]></AD_COLUMN_ID>
 <!--956-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--956-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--956-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--956-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--956-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--956-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -11516,7 +11515,7 @@
 <!--957-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--957-->  <AD_COLUMN_ID><![CDATA[339]]></AD_COLUMN_ID>
 <!--957-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--957-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--957-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--957-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--957-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--957-->  <SEQNO><![CDATA[80]]></SEQNO>
@@ -11540,7 +11539,7 @@
 <!--958-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--958-->  <AD_COLUMN_ID><![CDATA[340]]></AD_COLUMN_ID>
 <!--958-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--958-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--958-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--958-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--958-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--958-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -15316,7 +15315,7 @@
 <!--1266-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--1266-->  <AD_COLUMN_ID><![CDATA[2377]]></AD_COLUMN_ID>
 <!--1266-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--1266-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--1266-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--1266-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1266-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--1266-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -20046,7 +20045,7 @@
 <!--1986-->  <AD_TAB_ID><![CDATA[103]]></AD_TAB_ID>
 <!--1986-->  <AD_COLUMN_ID><![CDATA[368]]></AD_COLUMN_ID>
 <!--1986-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--1986-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='T']]></DISPLAYLOGIC>
+<!--1986-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='18']]></DISPLAYLOGIC>
 <!--1986-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--1986-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--1986-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -20070,7 +20069,7 @@
 <!--1987-->  <AD_TAB_ID><![CDATA[104]]></AD_TAB_ID>
 <!--1987-->  <AD_COLUMN_ID><![CDATA[372]]></AD_COLUMN_ID>
 <!--1987-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--1987-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--1987-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--1987-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--1987-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--1987-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -21084,7 +21083,7 @@
 <!--2038-->  <AD_TAB_ID><![CDATA[172]]></AD_TAB_ID>
 <!--2038-->  <AD_COLUMN_ID><![CDATA[1216]]></AD_COLUMN_ID>
 <!--2038-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--2038-->  <DISPLAYLOGIC><![CDATA[@ValidationType@='L']]></DISPLAYLOGIC>
+<!--2038-->  <DISPLAYLOGIC><![CDATA[@ParentReference_ID@='17']]></DISPLAYLOGIC>
 <!--2038-->  <DISPLAYLENGTH><![CDATA[44]]></DISPLAYLENGTH>
 <!--2038-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--2038-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -192616,6 +192615,122 @@
 <!--781A06642FD511DE882C001D09C4A2FE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--781A06642FD511DE882C001D09C4A2FE--></AD_FIELD>
 
+<!--7994C59E1CDD1F99E040007F01015756--><AD_FIELD>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_FIELD_ID><![CDATA[7994C59E1CDD1F99E040007F01015756]]></AD_FIELD_ID>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7994C59E1CDD1F99E040007F01015756-->  <NAME><![CDATA[Base Reference]]></NAME>
+<!--7994C59E1CDD1F99E040007F01015756-->  <DESCRIPTION><![CDATA[Base Reference]]></DESCRIPTION>
+<!--7994C59E1CDD1F99E040007F01015756-->  <HELP><![CDATA[Base References are the ones that can be directly applied to a column. Base references can define subreferences.]]></HELP>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_COLUMN_ID><![CDATA[79957912A86EC7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7994C59E1CDD1F99E040007F01015756-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7994C59E1CDD1F99E040007F01015756-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7994C59E1CDD1F99E040007F01015756-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--7994C59E1CDD1F99E040007F01015756-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7994C59E1CDD1F99E040007F01015756-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7994C59E1CDD1F99E040007F01015756--></AD_FIELD>
+
+<!--7994C59E1CDE1F99E040007F01015756--><AD_FIELD>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_FIELD_ID><![CDATA[7994C59E1CDE1F99E040007F01015756]]></AD_FIELD_ID>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7994C59E1CDE1F99E040007F01015756-->  <NAME><![CDATA[Model Implememtation]]></NAME>
+<!--7994C59E1CDE1F99E040007F01015756-->  <DESCRIPTION><![CDATA[Java class implementing Model.]]></DESCRIPTION>
+<!--7994C59E1CDE1F99E040007F01015756-->  <HELP><![CDATA[Java class implementing Model. It is the java class used to generate DAL classes.]]></HELP>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_COLUMN_ID><![CDATA[79957912A870C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7994C59E1CDE1F99E040007F01015756-->  <DISPLAYLENGTH><![CDATA[300]]></DISPLAYLENGTH>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7994C59E1CDE1F99E040007F01015756-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7994C59E1CDE1F99E040007F01015756-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--7994C59E1CDE1F99E040007F01015756-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7994C59E1CDE1F99E040007F01015756-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7994C59E1CDE1F99E040007F01015756--></AD_FIELD>
+
+<!--7994C59E1CDF1F99E040007F01015756--><AD_FIELD>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_FIELD_ID><![CDATA[7994C59E1CDF1F99E040007F01015756]]></AD_FIELD_ID>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7994C59E1CDF1F99E040007F01015756-->  <NAME><![CDATA[Parent Reference]]></NAME>
+<!--7994C59E1CDF1F99E040007F01015756-->  <DESCRIPTION><![CDATA[Subreference's parent reference]]></DESCRIPTION>
+<!--7994C59E1CDF1F99E040007F01015756-->  <HELP><![CDATA[When the reference is set as non base reference, it is necessary to indicate which is its parent reference. ]]></HELP>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_COLUMN_ID><![CDATA[79957912A86FC7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7994C59E1CDF1F99E040007F01015756-->  <DISPLAYLOGIC><![CDATA[@IsBaseReference@='N']]></DISPLAYLOGIC>
+<!--7994C59E1CDF1F99E040007F01015756-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7994C59E1CDF1F99E040007F01015756-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7994C59E1CDF1F99E040007F01015756-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--7994C59E1CDF1F99E040007F01015756-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7994C59E1CDF1F99E040007F01015756-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7994C59E1CDF1F99E040007F01015756--></AD_FIELD>
+
+<!--7994C59E1CE01F99E040007F01015756--><AD_FIELD>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_FIELD_ID><![CDATA[7994C59E1CE01F99E040007F01015756]]></AD_FIELD_ID>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7994C59E1CE01F99E040007F01015756-->  <NAME><![CDATA[Runtime UI Implementation]]></NAME>
+<!--7994C59E1CE01F99E040007F01015756-->  <DESCRIPTION><![CDATA[Java class implementing runtime UI.]]></DESCRIPTION>
+<!--7994C59E1CE01F99E040007F01015756-->  <HELP><![CDATA[Java class implementing runtime UI.]]></HELP>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_COLUMN_ID><![CDATA[79957912A872C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7994C59E1CE01F99E040007F01015756-->  <DISPLAYLENGTH><![CDATA[300]]></DISPLAYLENGTH>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7994C59E1CE01F99E040007F01015756-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7994C59E1CE01F99E040007F01015756-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--7994C59E1CE01F99E040007F01015756-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7994C59E1CE01F99E040007F01015756-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7994C59E1CE01F99E040007F01015756--></AD_FIELD>
+
+<!--7994C59E1CE11F99E040007F01015756--><AD_FIELD>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_FIELD_ID><![CDATA[7994C59E1CE11F99E040007F01015756]]></AD_FIELD_ID>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7994C59E1CE11F99E040007F01015756-->  <NAME><![CDATA[WAD Implementation]]></NAME>
+<!--7994C59E1CE11F99E040007F01015756-->  <DESCRIPTION><![CDATA[Java class implementing WAD]]></DESCRIPTION>
+<!--7994C59E1CE11F99E040007F01015756-->  <HELP><![CDATA[Java class implementing WAD]]></HELP>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_TAB_ID><![CDATA[102]]></AD_TAB_ID>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_COLUMN_ID><![CDATA[79957912A871C7D8E040007F010156EE]]></AD_COLUMN_ID>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7994C59E1CE11F99E040007F01015756-->  <DISPLAYLENGTH><![CDATA[300]]></DISPLAYLENGTH>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7994C59E1CE11F99E040007F01015756-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7994C59E1CE11F99E040007F01015756-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--7994C59E1CE11F99E040007F01015756-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7994C59E1CE11F99E040007F01015756-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7994C59E1CE11F99E040007F01015756--></AD_FIELD>
+
 <!--7CB84C12E8A911DDAD920016D4EE9DB3--><AD_FIELD>
 <!--7CB84C12E8A911DDAD920016D4EE9DB3-->  <AD_FIELD_ID><![CDATA[7CB84C12E8A911DDAD920016D4EE9DB3]]></AD_FIELD_ID>
 <!--7CB84C12E8A911DDAD920016D4EE9DB3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -29734,17 +29734,6 @@
 <!--1237DD133882495FB6AF87E80A852A66-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1237DD133882495FB6AF87E80A852A66--></AD_MESSAGE>
 
-<!--1299B933978E465AB8D9E73B85F10A1A--><AD_MESSAGE>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <AD_MESSAGE_ID><![CDATA[1299B933978E465AB8D9E73B85F10A1A]]></AD_MESSAGE_ID>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <VALUE><![CDATA[20535]]></VALUE>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <MSGTEXT><![CDATA[New datatype references are not allowed in modules.]]></MSGTEXT>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
-<!--1299B933978E465AB8D9E73B85F10A1A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--1299B933978E465AB8D9E73B85F10A1A--></AD_MESSAGE>
-
 <!--1312C32F5ECB439A8D5EE56876CC43C1--><AD_MESSAGE>
 <!--1312C32F5ECB439A8D5EE56876CC43C1-->  <AD_MESSAGE_ID><![CDATA[1312C32F5ECB439A8D5EE56876CC43C1]]></AD_MESSAGE_ID>
 <!--1312C32F5ECB439A8D5EE56876CC43C1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -31227,6 +31216,17 @@
 <!--8DB007EDD43F487790B3E304D41C39E6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8DB007EDD43F487790B3E304D41C39E6--></AD_MESSAGE>
 
+<!--90227390063C4D1BA7187A2F12C6A55A--><AD_MESSAGE>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <AD_MESSAGE_ID><![CDATA[90227390063C4D1BA7187A2F12C6A55A]]></AD_MESSAGE_ID>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <VALUE><![CDATA[IF_NOT_BASE_THEN_PARENT_MANDATORY]]></VALUE>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <MSGTEXT><![CDATA[If the reference is not a base type then the parent reference must be set]]></MSGTEXT>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--90227390063C4D1BA7187A2F12C6A55A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--90227390063C4D1BA7187A2F12C6A55A--></AD_MESSAGE>
+
 <!--90DBF95BB32E4A2CAFDFFCCF64D7C63D--><AD_MESSAGE>
 <!--90DBF95BB32E4A2CAFDFFCCF64D7C63D-->  <AD_MESSAGE_ID><![CDATA[90DBF95BB32E4A2CAFDFFCCF64D7C63D]]></AD_MESSAGE_ID>
 <!--90DBF95BB32E4A2CAFDFFCCF64D7C63D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODULE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -11,7 +11,7 @@
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
 <!--0-->  <TYPE><![CDATA[M]]></TYPE>
-<!--0-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License version 1.0.
+<!--0-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License version 1.0.
 You may obtain a copy of the License at http://www.openbravo.com/legal/license.html or in the legal folder of the Openbravo ERP core distribution.]]></LICENSE>
 <!--0-->  <JAVAPACKAGE><![CDATA[org.openbravo]]></JAVAPACKAGE>
 <!--0-->  <LICENSETYPE><![CDATA[OBPL]]></LICENSETYPE>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -9,6 +9,8 @@
 <!--1-->  <DESCRIPTION><![CDATA[Data Type selection]]></DESCRIPTION>
 <!--1-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--1--></AD_REFERENCE>
 
 <!--2--><AD_REFERENCE>
@@ -22,6 +24,8 @@
 <!--2-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--2-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--2-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--2--></AD_REFERENCE>
 
 <!--3--><AD_REFERENCE>
@@ -33,6 +37,8 @@
 <!--3-->  <DESCRIPTION><![CDATA[Column selection]]></DESCRIPTION>
 <!--3-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--3-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--3--></AD_REFERENCE>
 
 <!--4--><AD_REFERENCE>
@@ -40,11 +46,13 @@
 <!--4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--4-->  <NAME><![CDATA[AD_Reference Values]]></NAME>
-<!--4-->  <DESCRIPTION><![CDATA[Reference (List and Table) selection]]></DESCRIPTION>
+<!--4-->  <NAME><![CDATA[AD_Reference Subreferences]]></NAME>
+<!--4-->  <DESCRIPTION><![CDATA[Subreference]]></DESCRIPTION>
 <!--4-->  <HELP><![CDATA[(not DataType and Independent)]]></HELP>
 <!--4-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--4-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--4--></AD_REFERENCE>
 
 <!--5--><AD_REFERENCE>
@@ -57,6 +65,8 @@
 <!--5-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--5-->  <VFORMAT><![CDATA[0]]></VFORMAT>
 <!--5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--5-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--5--></AD_REFERENCE>
 
 <!--10--><AD_REFERENCE>
@@ -68,6 +78,10 @@
 <!--10-->  <DESCRIPTION><![CDATA[Character String]]></DESCRIPTION>
 <!--10-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--10-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--10-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--10-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringDomainType]]></MODEL_IMPL>
+<!--10-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADString]]></WAD_IMPL>
+<!--10-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIString]]></UI_IMPL>
 <!--10--></AD_REFERENCE>
 
 <!--11--><AD_REFERENCE>
@@ -79,6 +93,10 @@
 <!--11-->  <DESCRIPTION><![CDATA[10 Digit numeric]]></DESCRIPTION>
 <!--11-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--11-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--11-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--11-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.LongDomainType]]></MODEL_IMPL>
+<!--11-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADInteger]]></WAD_IMPL>
+<!--11-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIInteger]]></UI_IMPL>
 <!--11--></AD_REFERENCE>
 
 <!--12--><AD_REFERENCE>
@@ -90,6 +108,10 @@
 <!--12-->  <DESCRIPTION><![CDATA[Number with 4 decimals]]></DESCRIPTION>
 <!--12-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--12-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--12-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--12-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BigDecimalDomainType]]></MODEL_IMPL>
+<!--12-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADAmount]]></WAD_IMPL>
+<!--12-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIAmount]]></UI_IMPL>
 <!--12--></AD_REFERENCE>
 
 <!--13--><AD_REFERENCE>
@@ -101,6 +123,10 @@
 <!--13-->  <DESCRIPTION><![CDATA[10 Digit Identifier]]></DESCRIPTION>
 <!--13-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--13-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--13-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--13-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringDomainType]]></MODEL_IMPL>
+<!--13-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADID]]></WAD_IMPL>
+<!--13-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIID]]></UI_IMPL>
 <!--13--></AD_REFERENCE>
 
 <!--14--><AD_REFERENCE>
@@ -112,6 +138,10 @@
 <!--14-->  <DESCRIPTION><![CDATA[Character String up to 2000 characters]]></DESCRIPTION>
 <!--14-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--14-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--14-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--14-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringDomainType]]></MODEL_IMPL>
+<!--14-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADText]]></WAD_IMPL>
+<!--14-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIText]]></UI_IMPL>
 <!--14--></AD_REFERENCE>
 
 <!--15--><AD_REFERENCE>
@@ -123,6 +153,10 @@
 <!--15-->  <DESCRIPTION><![CDATA[Date mm/dd/yyyy]]></DESCRIPTION>
 <!--15-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--15-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--15-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--15-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.DateDomainType]]></MODEL_IMPL>
+<!--15-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADDate]]></WAD_IMPL>
+<!--15-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIDate]]></UI_IMPL>
 <!--15--></AD_REFERENCE>
 
 <!--16--><AD_REFERENCE>
@@ -134,6 +168,10 @@
 <!--16-->  <DESCRIPTION><![CDATA[Date with time]]></DESCRIPTION>
 <!--16-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--16-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--16-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--16-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.DatetimeDomainType]]></MODEL_IMPL>
+<!--16-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADDateTime]]></WAD_IMPL>
+<!--16-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIDateTime]]></UI_IMPL>
 <!--16--></AD_REFERENCE>
 
 <!--17--><AD_REFERENCE>
@@ -145,6 +183,10 @@
 <!--17-->  <DESCRIPTION><![CDATA[Reference List]]></DESCRIPTION>
 <!--17-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--17-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--17-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--17-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringEnumerateDomainType]]></MODEL_IMPL>
+<!--17-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADList]]></WAD_IMPL>
+<!--17-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIList]]></UI_IMPL>
 <!--17--></AD_REFERENCE>
 
 <!--18--><AD_REFERENCE>
@@ -156,6 +198,10 @@
 <!--18-->  <DESCRIPTION><![CDATA[Table List]]></DESCRIPTION>
 <!--18-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--18-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--18-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--18-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TableDomainType]]></MODEL_IMPL>
+<!--18-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADTable]]></WAD_IMPL>
+<!--18-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UITable]]></UI_IMPL>
 <!--18--></AD_REFERENCE>
 
 <!--19--><AD_REFERENCE>
@@ -167,6 +213,10 @@
 <!--19-->  <DESCRIPTION><![CDATA[Direct Table Access]]></DESCRIPTION>
 <!--19-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--19-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--19-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--19-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TableDirDomainType]]></MODEL_IMPL>
+<!--19-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADTableDir]]></WAD_IMPL>
+<!--19-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UITableDir]]></UI_IMPL>
 <!--19--></AD_REFERENCE>
 
 <!--20--><AD_REFERENCE>
@@ -178,6 +228,10 @@
 <!--20-->  <DESCRIPTION><![CDATA[CheckBox]]></DESCRIPTION>
 <!--20-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--20-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--20-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--20-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BooleanDomainType]]></MODEL_IMPL>
+<!--20-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADYesNo]]></WAD_IMPL>
+<!--20-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIYesNo]]></UI_IMPL>
 <!--20--></AD_REFERENCE>
 
 <!--21--><AD_REFERENCE>
@@ -189,6 +243,8 @@
 <!--21-->  <DESCRIPTION><![CDATA[Location/Address]]></DESCRIPTION>
 <!--21-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--21-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--21-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--21-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--21--></AD_REFERENCE>
 
 <!--22--><AD_REFERENCE>
@@ -200,6 +256,10 @@
 <!--22-->  <DESCRIPTION><![CDATA[Float Number]]></DESCRIPTION>
 <!--22-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--22-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--22-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BigDecimalDomainType]]></MODEL_IMPL>
+<!--22-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADNumber]]></WAD_IMPL>
+<!--22-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UINumber]]></UI_IMPL>
 <!--22--></AD_REFERENCE>
 
 <!--23--><AD_REFERENCE>
@@ -211,6 +271,10 @@
 <!--23-->  <DESCRIPTION><![CDATA[Binary Data]]></DESCRIPTION>
 <!--23-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--23-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--23-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--23-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BinaryDomainType]]></MODEL_IMPL>
+<!--23-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADBinary]]></WAD_IMPL>
+<!--23-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIBinary]]></UI_IMPL>
 <!--23--></AD_REFERENCE>
 
 <!--24--><AD_REFERENCE>
@@ -222,6 +286,10 @@
 <!--24-->  <DESCRIPTION><![CDATA[Time]]></DESCRIPTION>
 <!--24-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--24-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--24-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--24-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TimestampDomainType]]></MODEL_IMPL>
+<!--24-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADTime]]></WAD_IMPL>
+<!--24-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UITime]]></UI_IMPL>
 <!--24--></AD_REFERENCE>
 
 <!--25--><AD_REFERENCE>
@@ -233,6 +301,8 @@
 <!--25-->  <DESCRIPTION><![CDATA[Account Element]]></DESCRIPTION>
 <!--25-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--25-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--25-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--25-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--25--></AD_REFERENCE>
 
 <!--26--><AD_REFERENCE>
@@ -244,6 +314,10 @@
 <!--26-->  <DESCRIPTION><![CDATA[Row ID Data Type]]></DESCRIPTION>
 <!--26-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--26-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--26-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--26-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.ObjectDomainType]]></MODEL_IMPL>
+<!--26-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADRowID]]></WAD_IMPL>
+<!--26-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIRowID]]></UI_IMPL>
 <!--26--></AD_REFERENCE>
 
 <!--27--><AD_REFERENCE>
@@ -255,6 +329,10 @@
 <!--27-->  <DESCRIPTION><![CDATA[Color element]]></DESCRIPTION>
 <!--27-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--27-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--27-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--27-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.ObjectDomainType]]></MODEL_IMPL>
+<!--27-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADColor]]></WAD_IMPL>
+<!--27-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIColor]]></UI_IMPL>
 <!--27--></AD_REFERENCE>
 
 <!--28--><AD_REFERENCE>
@@ -266,6 +344,10 @@
 <!--28-->  <DESCRIPTION><![CDATA[Command Button - starts a process]]></DESCRIPTION>
 <!--28-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--28-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--28-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--28-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.ButtonDomainType]]></MODEL_IMPL>
+<!--28-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADButton]]></WAD_IMPL>
+<!--28-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIButton]]></UI_IMPL>
 <!--28--></AD_REFERENCE>
 
 <!--29--><AD_REFERENCE>
@@ -277,6 +359,10 @@
 <!--29-->  <DESCRIPTION><![CDATA[Quantity data type]]></DESCRIPTION>
 <!--29-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--29-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--29-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--29-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BigDecimalDomainType]]></MODEL_IMPL>
+<!--29-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADQuantity]]></WAD_IMPL>
+<!--29-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIQuantity]]></UI_IMPL>
 <!--29--></AD_REFERENCE>
 
 <!--30--><AD_REFERENCE>
@@ -288,6 +374,10 @@
 <!--30-->  <DESCRIPTION><![CDATA[Search Field]]></DESCRIPTION>
 <!--30-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--30-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--30-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--30-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.SearchDomainType]]></MODEL_IMPL>
+<!--30-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADSearch]]></WAD_IMPL>
+<!--30-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UISearch]]></UI_IMPL>
 <!--30--></AD_REFERENCE>
 
 <!--31--><AD_REFERENCE>
@@ -299,6 +389,8 @@
 <!--31-->  <DESCRIPTION><![CDATA[Warehouse Locator Data type]]></DESCRIPTION>
 <!--31-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--31-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--31-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--31-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--31--></AD_REFERENCE>
 
 <!--32--><AD_REFERENCE>
@@ -310,6 +402,10 @@
 <!--32-->  <DESCRIPTION><![CDATA[Binary Image Data]]></DESCRIPTION>
 <!--32-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--32-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--32-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--32-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TableDirDomainType]]></MODEL_IMPL>
+<!--32-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADImage]]></WAD_IMPL>
+<!--32-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIImage]]></UI_IMPL>
 <!--32--></AD_REFERENCE>
 
 <!--33--><AD_REFERENCE>
@@ -321,6 +417,9 @@
 <!--33-->  <DESCRIPTION><![CDATA[Resource Assignment]]></DESCRIPTION>
 <!--33-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--33-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--33-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--33-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TableDirDomainType]]></MODEL_IMPL>
+<!--33-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADAssignment]]></WAD_IMPL>
 <!--33--></AD_REFERENCE>
 
 <!--34--><AD_REFERENCE>
@@ -332,6 +431,10 @@
 <!--34-->  <DESCRIPTION><![CDATA[Large Text - Character String up to 2000 characters]]></DESCRIPTION>
 <!--34-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--34-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--34-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--34-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringDomainType]]></MODEL_IMPL>
+<!--34-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADMemo]]></WAD_IMPL>
+<!--34-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIMemo]]></UI_IMPL>
 <!--34--></AD_REFERENCE>
 
 <!--35--><AD_REFERENCE>
@@ -343,6 +446,10 @@
 <!--35-->  <DESCRIPTION><![CDATA[Product Attribute]]></DESCRIPTION>
 <!--35-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--35-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--35-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--35-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.TableDirDomainType]]></MODEL_IMPL>
+<!--35-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADPAttribute]]></WAD_IMPL>
+<!--35-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIPAttribute]]></UI_IMPL>
 <!--35--></AD_REFERENCE>
 
 <!--100--><AD_REFERENCE>
@@ -354,6 +461,8 @@
 <!--100-->  <DESCRIPTION><![CDATA[Validation rule Parent selection]]></DESCRIPTION>
 <!--100-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--100-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--100-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--100-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--100--></AD_REFERENCE>
 
 <!--101--><AD_REFERENCE>
@@ -367,6 +476,8 @@
 <!--101-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--101-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--101-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--101-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--101-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--101--></AD_REFERENCE>
 
 <!--102--><AD_REFERENCE>
@@ -378,6 +489,8 @@
 <!--102-->  <DESCRIPTION><![CDATA[Message selection]]></DESCRIPTION>
 <!--102-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--102-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--102-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--102-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--102--></AD_REFERENCE>
 
 <!--103--><AD_REFERENCE>
@@ -390,6 +503,8 @@
 <!--103-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--103-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--103-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--103-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--103-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--103--></AD_REFERENCE>
 
 <!--104--><AD_REFERENCE>
@@ -402,6 +517,8 @@
 <!--104-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--104-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--104-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--104-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--104-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--104--></AD_REFERENCE>
 
 <!--105--><AD_REFERENCE>
@@ -413,6 +530,8 @@
 <!--105-->  <DESCRIPTION><![CDATA[Menu Parent selection]]></DESCRIPTION>
 <!--105-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--105-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--105-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--105-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--105--></AD_REFERENCE>
 
 <!--106--><AD_REFERENCE>
@@ -424,6 +543,8 @@
 <!--106-->  <DESCRIPTION><![CDATA[Language selection]]></DESCRIPTION>
 <!--106-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--106-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--106-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--106-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--106--></AD_REFERENCE>
 
 <!--108--><AD_REFERENCE>
@@ -437,6 +558,8 @@
 <!--108-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--108-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--108-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--108-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--108-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--108--></AD_REFERENCE>
 
 <!--109--><AD_REFERENCE>
@@ -448,6 +571,8 @@
 <!--109-->  <DESCRIPTION><![CDATA[Next workflow node selection]]></DESCRIPTION>
 <!--109-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--109-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--109-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--109-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--109--></AD_REFERENCE>
 
 <!--110--><AD_REFERENCE>
@@ -459,6 +584,8 @@
 <!--110-->  <DESCRIPTION><![CDATA[User selection]]></DESCRIPTION>
 <!--110-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--110-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--110-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--110-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--110--></AD_REFERENCE>
 
 <!--111--><AD_REFERENCE>
@@ -471,6 +598,8 @@
 <!--111-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--111-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--111-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--111-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--111-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--111--></AD_REFERENCE>
 
 <!--112--><AD_REFERENCE>
@@ -482,6 +611,8 @@
 <!--112-->  <DESCRIPTION><![CDATA[Currencies of C_Currency table]]></DESCRIPTION>
 <!--112-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--112-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--112-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--112-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--112--></AD_REFERENCE>
 
 <!--113--><AD_REFERENCE>
@@ -493,6 +624,8 @@
 <!--113-->  <DESCRIPTION><![CDATA[Organization Parent selection]]></DESCRIPTION>
 <!--113-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--113-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--113-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--113-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--113--></AD_REFERENCE>
 
 <!--114--><AD_REFERENCE>
@@ -504,6 +637,8 @@
 <!--114-->  <DESCRIPTION><![CDATA[Unit of Measure selection]]></DESCRIPTION>
 <!--114-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--114-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--114-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--114-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--114--></AD_REFERENCE>
 
 <!--115--><AD_REFERENCE>
@@ -516,6 +651,8 @@
 <!--115-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--115-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--115-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--115-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--115-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--115--></AD_REFERENCE>
 
 <!--116--><AD_REFERENCE>
@@ -528,6 +665,8 @@
 <!--116-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--116-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--116-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--116-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--116-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--116--></AD_REFERENCE>
 
 <!--117--><AD_REFERENCE>
@@ -540,6 +679,8 @@
 <!--117-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--117-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--117-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--117-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--117-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--117--></AD_REFERENCE>
 
 <!--118--><AD_REFERENCE>
@@ -552,6 +693,8 @@
 <!--118-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--118-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--118-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--118-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--118-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--118--></AD_REFERENCE>
 
 <!--120--><AD_REFERENCE>
@@ -565,6 +708,8 @@
 <!--120-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--120-->  <VFORMAT><![CDATA[LL]]></VFORMAT>
 <!--120-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--120-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--120-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--120--></AD_REFERENCE>
 
 <!--121--><AD_REFERENCE>
@@ -578,6 +723,8 @@
 <!--121-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--121-->  <VFORMAT><![CDATA[AA]]></VFORMAT>
 <!--121-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--121-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--121-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--121--></AD_REFERENCE>
 
 <!--122--><AD_REFERENCE>
@@ -590,6 +737,8 @@
 <!--122-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--122-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--122-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--122-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--122-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--122--></AD_REFERENCE>
 
 <!--123--><AD_REFERENCE>
@@ -602,6 +751,8 @@
 <!--123-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--123-->  <VFORMAT><![CDATA[LL]]></VFORMAT>
 <!--123-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--123-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--123-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--123--></AD_REFERENCE>
 
 <!--124--><AD_REFERENCE>
@@ -613,6 +764,8 @@
 <!--124-->  <DESCRIPTION><![CDATA[Business Partner Parent selection]]></DESCRIPTION>
 <!--124-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--124-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--124-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--124-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--124--></AD_REFERENCE>
 
 <!--125--><AD_REFERENCE>
@@ -625,6 +778,8 @@
 <!--125-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--125-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--125-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--125-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--125-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--125--></AD_REFERENCE>
 
 <!--126--><AD_REFERENCE>
@@ -637,6 +792,8 @@
 <!--126-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--126-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--126-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--126-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--126-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--126--></AD_REFERENCE>
 
 <!--128--><AD_REFERENCE>
@@ -648,6 +805,8 @@
 <!--128-->  <DESCRIPTION><![CDATA[Sequence for Document selection]]></DESCRIPTION>
 <!--128-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--128-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--128-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--128-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--128--></AD_REFERENCE>
 
 <!--129--><AD_REFERENCE>
@@ -659,6 +818,8 @@
 <!--129-->  <DESCRIPTION><![CDATA[Client selection]]></DESCRIPTION>
 <!--129-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--129-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--129-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--129-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--129--></AD_REFERENCE>
 
 <!--130--><AD_REFERENCE>
@@ -670,6 +831,8 @@
 <!--130-->  <DESCRIPTION><![CDATA[Organization selection, no summary, no 0]]></DESCRIPTION>
 <!--130-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--130-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--130-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--130-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--130--></AD_REFERENCE>
 
 <!--131--><AD_REFERENCE>
@@ -682,6 +845,8 @@
 <!--131-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--131-->  <VFORMAT><![CDATA[LL]]></VFORMAT>
 <!--131-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--131-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--131-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--131--></AD_REFERENCE>
 
 <!--132--><AD_REFERENCE>
@@ -693,6 +858,8 @@
 <!--132-->  <DESCRIPTION><![CDATA[Account selection]]></DESCRIPTION>
 <!--132-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--132-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--132-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--132-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--132--></AD_REFERENCE>
 
 <!--133--><AD_REFERENCE>
@@ -704,6 +871,8 @@
 <!--133-->  <DESCRIPTION><![CDATA[Location selection]]></DESCRIPTION>
 <!--133-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--133-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--133-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--133-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--133--></AD_REFERENCE>
 
 <!--134--><AD_REFERENCE>
@@ -715,6 +884,8 @@
 <!--134-->  <DESCRIPTION><![CDATA[User1 selection]]></DESCRIPTION>
 <!--134-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--134-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--134-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--134-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--134--></AD_REFERENCE>
 
 <!--135--><AD_REFERENCE>
@@ -727,6 +898,8 @@
 <!--135-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--135-->  <VFORMAT><![CDATA[LL]]></VFORMAT>
 <!--135-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--135-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--135-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--135--></AD_REFERENCE>
 
 <!--136--><AD_REFERENCE>
@@ -738,6 +911,8 @@
 <!--136-->  <DESCRIPTION><![CDATA[Accounting Schema selection]]></DESCRIPTION>
 <!--136-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--136-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--136-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--136-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--136--></AD_REFERENCE>
 
 <!--137--><AD_REFERENCE>
@@ -749,6 +924,8 @@
 <!--137-->  <DESCRIPTION><![CDATA[User2 selection]]></DESCRIPTION>
 <!--137-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--137-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--137-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--137-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--137--></AD_REFERENCE>
 
 <!--138--><AD_REFERENCE>
@@ -760,6 +937,8 @@
 <!--138-->  <DESCRIPTION><![CDATA[Business Partner selection (no Summary)]]></DESCRIPTION>
 <!--138-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--138-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--138-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--138-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--138--></AD_REFERENCE>
 
 <!--140--><AD_REFERENCE>
@@ -771,6 +950,8 @@
 <!--140-->  <DESCRIPTION><![CDATA[Product selection]]></DESCRIPTION>
 <!--140-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--140-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--140-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--140-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--140--></AD_REFERENCE>
 
 <!--141--><AD_REFERENCE>
@@ -782,6 +963,8 @@
 <!--141-->  <DESCRIPTION><![CDATA[Project selection]]></DESCRIPTION>
 <!--141-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--141-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--141-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--141-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--141--></AD_REFERENCE>
 
 <!--142--><AD_REFERENCE>
@@ -793,6 +976,8 @@
 <!--142-->  <DESCRIPTION><![CDATA[Activity selection]]></DESCRIPTION>
 <!--142-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--142-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--142-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--142-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--142--></AD_REFERENCE>
 
 <!--143--><AD_REFERENCE>
@@ -804,6 +989,8 @@
 <!--143-->  <DESCRIPTION><![CDATA[Campaign selection]]></DESCRIPTION>
 <!--143-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--143-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--143-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--143-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--143--></AD_REFERENCE>
 
 <!--144--><AD_REFERENCE>
@@ -815,6 +1002,8 @@
 <!--144-->  <DESCRIPTION><![CDATA[Sales Region selection]]></DESCRIPTION>
 <!--144-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--144-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--144-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--144-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--144--></AD_REFERENCE>
 
 <!--145--><AD_REFERENCE>
@@ -826,6 +1015,8 @@
 <!--145-->  <DESCRIPTION><![CDATA[Element selection]]></DESCRIPTION>
 <!--145-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--145-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--145-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--145-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--145--></AD_REFERENCE>
 
 <!--148--><AD_REFERENCE>
@@ -837,6 +1028,8 @@
 <!--148-->  <DESCRIPTION><![CDATA[Order Types list]]></DESCRIPTION>
 <!--148-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--148-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--148-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--148-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--148--></AD_REFERENCE>
 
 <!--149--><AD_REFERENCE>
@@ -849,6 +1042,8 @@
 <!--149-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--149-->  <VFORMAT><![CDATA[A]]></VFORMAT>
 <!--149-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--149-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--149-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--149--></AD_REFERENCE>
 
 <!--150--><AD_REFERENCE>
@@ -860,6 +1055,8 @@
 <!--150-->  <DESCRIPTION><![CDATA[Invoicing Rules list]]></DESCRIPTION>
 <!--150-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--150-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--150-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--150-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--150--></AD_REFERENCE>
 
 <!--151--><AD_REFERENCE>
@@ -871,6 +1068,8 @@
 <!--151-->  <DESCRIPTION><![CDATA[Delivery Rules list]]></DESCRIPTION>
 <!--151-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--151-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--151-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--151-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--151--></AD_REFERENCE>
 
 <!--152--><AD_REFERENCE>
@@ -882,6 +1081,8 @@
 <!--152-->  <DESCRIPTION><![CDATA[Delivery via Rule list]]></DESCRIPTION>
 <!--152-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--152-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--152-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--152-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--152--></AD_REFERENCE>
 
 <!--153--><AD_REFERENCE>
@@ -893,6 +1094,8 @@
 <!--153-->  <DESCRIPTION><![CDATA[Freight cost Rule list]]></DESCRIPTION>
 <!--153-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--153-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--153-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--153-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--153--></AD_REFERENCE>
 
 <!--154--><AD_REFERENCE>
@@ -904,6 +1107,8 @@
 <!--154-->  <DESCRIPTION><![CDATA[Priority scale list]]></DESCRIPTION>
 <!--154-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--154-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--154-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--154-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--154--></AD_REFERENCE>
 
 <!--155--><AD_REFERENCE>
@@ -915,6 +1120,8 @@
 <!--155-->  <DESCRIPTION><![CDATA[Price Rounding Rule list]]></DESCRIPTION>
 <!--155-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--155-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--155-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--155-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--155--></AD_REFERENCE>
 
 <!--156--><AD_REFERENCE>
@@ -926,6 +1133,8 @@
 <!--156-->  <DESCRIPTION><![CDATA[Country selection]]></DESCRIPTION>
 <!--156-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--156-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--156-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--156-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--156--></AD_REFERENCE>
 
 <!--157--><AD_REFERENCE>
@@ -937,6 +1146,8 @@
 <!--157-->  <DESCRIPTION><![CDATA[Region selection]]></DESCRIPTION>
 <!--157-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--157-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--157-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--157-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--157--></AD_REFERENCE>
 
 <!--158--><AD_REFERENCE>
@@ -948,6 +1159,8 @@
 <!--158-->  <DESCRIPTION><![CDATA[Tax selection where parent is NULL]]></DESCRIPTION>
 <!--158-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--158-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--158-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--158-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--158--></AD_REFERENCE>
 
 <!--159--><AD_REFERENCE>
@@ -959,6 +1172,8 @@
 <!--159-->  <DESCRIPTION><![CDATA[Locations of a Business Partner]]></DESCRIPTION>
 <!--159-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--159-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--159-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--159-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--159--></AD_REFERENCE>
 
 <!--161--><AD_REFERENCE>
@@ -969,6 +1184,8 @@
 <!--161-->  <NAME><![CDATA[M_Product Parent]]></NAME>
 <!--161-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--161-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--161-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--161-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--161--></AD_REFERENCE>
 
 <!--162--><AD_REFERENCE>
@@ -980,6 +1197,8 @@
 <!--162-->  <DESCRIPTION><![CDATA[Product selection, no summary]]></DESCRIPTION>
 <!--162-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--162-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--162-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--162-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--162--></AD_REFERENCE>
 
 <!--163--><AD_REFERENCE>
@@ -990,6 +1209,8 @@
 <!--163-->  <NAME><![CDATA[M_Product Category]]></NAME>
 <!--163-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--163-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--163-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--163-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--163--></AD_REFERENCE>
 
 <!--164--><AD_REFERENCE>
@@ -1000,6 +1221,8 @@
 <!--164-->  <NAME><![CDATA[M_Replenish Type]]></NAME>
 <!--164-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--164-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--164-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--164-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--164--></AD_REFERENCE>
 
 <!--166--><AD_REFERENCE>
@@ -1010,6 +1233,8 @@
 <!--166-->  <NAME><![CDATA[M_PriceListForSale]]></NAME>
 <!--166-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--166-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--166-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--166-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--166--></AD_REFERENCE>
 
 <!--167--><AD_REFERENCE>
@@ -1021,6 +1246,8 @@
 <!--167-->  <DESCRIPTION><![CDATA[List of days]]></DESCRIPTION>
 <!--167-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--167-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--167-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--167-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--167--></AD_REFERENCE>
 
 <!--168--><AD_REFERENCE>
@@ -1031,6 +1258,8 @@
 <!--168-->  <NAME><![CDATA[C_InvoiceSchedule InvoiceFrequency]]></NAME>
 <!--168-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--168-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--168-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--168-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--168--></AD_REFERENCE>
 
 <!--169--><AD_REFERENCE>
@@ -1041,6 +1270,8 @@
 <!--169-->  <NAME><![CDATA[C_Project Parent]]></NAME>
 <!--169-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--169-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--169-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--169-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--169--></AD_REFERENCE>
 
 <!--170--><AD_REFERENCE>
@@ -1051,6 +1282,8 @@
 <!--170-->  <NAME><![CDATA[C_DocType]]></NAME>
 <!--170-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--170-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--170-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--170-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--170--></AD_REFERENCE>
 
 <!--171--><AD_REFERENCE>
@@ -1061,6 +1294,8 @@
 <!--171-->  <NAME><![CDATA[M_Product (stocked)]]></NAME>
 <!--171-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--171-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--171-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--171-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--171--></AD_REFERENCE>
 
 <!--172--><AD_REFERENCE>
@@ -1071,6 +1306,8 @@
 <!--172-->  <NAME><![CDATA[C_DocType SO]]></NAME>
 <!--172-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--172-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--172-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--172-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--172--></AD_REFERENCE>
 
 <!--173--><AD_REFERENCE>
@@ -1082,6 +1319,8 @@
 <!--173-->  <DESCRIPTION><![CDATA[Customer selection]]></DESCRIPTION>
 <!--173-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--173-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--173-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--173-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--173--></AD_REFERENCE>
 
 <!--174--><AD_REFERENCE>
@@ -1093,6 +1332,8 @@
 <!--174-->  <DESCRIPTION><![CDATA[Workflows]]></DESCRIPTION>
 <!--174-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--174-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--174-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--174-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--174--></AD_REFERENCE>
 
 <!--175--><AD_REFERENCE>
@@ -1104,6 +1345,8 @@
 <!--175-->  <DESCRIPTION><![CDATA[Valid Account combinations]]></DESCRIPTION>
 <!--175-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--175-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--175-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--175-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--175--></AD_REFERENCE>
 
 <!--176--><AD_REFERENCE>
@@ -1115,6 +1358,8 @@
 <!--176-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--176-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--176-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--176-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--176-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--176--></AD_REFERENCE>
 
 <!--177--><AD_REFERENCE>
@@ -1126,6 +1371,8 @@
 <!--177-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--177-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--177-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--177-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--177-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--177--></AD_REFERENCE>
 
 <!--178--><AD_REFERENCE>
@@ -1137,6 +1384,8 @@
 <!--178-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--178-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--178-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--178-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--178-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--178--></AD_REFERENCE>
 
 <!--179--><AD_REFERENCE>
@@ -1147,6 +1396,8 @@
 <!--179-->  <NAME><![CDATA[C_SalesRegion Parent]]></NAME>
 <!--179-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--179-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--179-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--179-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--179--></AD_REFERENCE>
 
 <!--180--><AD_REFERENCE>
@@ -1159,6 +1410,8 @@
 <!--180-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--180-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--180-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--180-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--180-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--180--></AD_REFERENCE>
 
 <!--181--><AD_REFERENCE>
@@ -1172,6 +1425,8 @@
 <!--181-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--181-->  <VFORMAT><![CDATA[AA]]></VFORMAT>
 <!--181-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--181-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--181-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--181--></AD_REFERENCE>
 
 <!--182--><AD_REFERENCE>
@@ -1183,6 +1438,8 @@
 <!--182-->  <DESCRIPTION><![CDATA[Element Values]]></DESCRIPTION>
 <!--182-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--182-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--182-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--182-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--182--></AD_REFERENCE>
 
 <!--183--><AD_REFERENCE>
@@ -1195,6 +1452,8 @@
 <!--183-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--183-->  <VFORMAT><![CDATA[LLL]]></VFORMAT>
 <!--183-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--183-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--183-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--183--></AD_REFERENCE>
 
 <!--184--><AD_REFERENCE>
@@ -1206,6 +1465,8 @@
 <!--184-->  <DESCRIPTION><![CDATA[Tree selection]]></DESCRIPTION>
 <!--184-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--184-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--184-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--184-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--184--></AD_REFERENCE>
 
 <!--187--><AD_REFERENCE>
@@ -1218,6 +1479,8 @@
 <!--187-->  <HELP><![CDATA[SalesRep_ID is synonym of AD_User_ID]]></HELP>
 <!--187-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--187-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--187-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--187-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--187--></AD_REFERENCE>
 
 <!--188--><AD_REFERENCE>
@@ -1228,6 +1491,8 @@
 <!--188-->  <NAME><![CDATA[M_PriceList Version]]></NAME>
 <!--188-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--188-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--188-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--188-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--188--></AD_REFERENCE>
 
 <!--189--><AD_REFERENCE>
@@ -1238,6 +1503,8 @@
 <!--189-->  <NAME><![CDATA[M_Transaction Movement Type]]></NAME>
 <!--189-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--189-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--189-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--189-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--189--></AD_REFERENCE>
 
 <!--190--><AD_REFERENCE>
@@ -1249,6 +1516,8 @@
 <!--190-->  <DESCRIPTION><![CDATA[Sales Representative]]></DESCRIPTION>
 <!--190-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--190-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--190-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--190-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--190--></AD_REFERENCE>
 
 <!--191--><AD_REFERENCE>
@@ -1260,6 +1529,8 @@
 <!--191-->  <DESCRIPTION><![CDATA[Warehouse Locator]]></DESCRIPTION>
 <!--191-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--191-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--191-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--191-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--191--></AD_REFERENCE>
 
 <!--192--><AD_REFERENCE>
@@ -1271,6 +1542,8 @@
 <!--192-->  <DESCRIPTION><![CDATA[Vendor selection]]></DESCRIPTION>
 <!--192-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--192-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--192-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--192-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--192--></AD_REFERENCE>
 
 <!--193--><AD_REFERENCE>
@@ -1281,6 +1554,8 @@
 <!--193-->  <NAME><![CDATA[C_BankAccount for Credit Card]]></NAME>
 <!--193-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--193-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--193-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--193-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--193--></AD_REFERENCE>
 
 <!--194--><AD_REFERENCE>
@@ -1291,6 +1566,8 @@
 <!--194-->  <NAME><![CDATA[M_DiscountPriceList Base]]></NAME>
 <!--194-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--194-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--194-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--194-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--194--></AD_REFERENCE>
 
 <!--195--><AD_REFERENCE>
@@ -1302,6 +1579,8 @@
 <!--195-->  <DESCRIPTION><![CDATA[In & Out Payment Options]]></DESCRIPTION>
 <!--195-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--195-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--195-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--195-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--195--></AD_REFERENCE>
 
 <!--196--><AD_REFERENCE>
@@ -1313,6 +1592,8 @@
 <!--196-->  <DESCRIPTION><![CDATA[Frequency of Revenue Recognition]]></DESCRIPTION>
 <!--196-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--196-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--196-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--196-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--196--></AD_REFERENCE>
 
 <!--197--><AD_REFERENCE>
@@ -1323,6 +1604,8 @@
 <!--197-->  <NAME><![CDATA[M_Warehouse of Client]]></NAME>
 <!--197-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--197-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--197-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--197-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--197--></AD_REFERENCE>
 
 <!--198--><AD_REFERENCE>
@@ -1333,6 +1616,8 @@
 <!--198-->  <NAME><![CDATA[M_Inventory ReportType]]></NAME>
 <!--198-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--198-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--198-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--198-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--198--></AD_REFERENCE>
 
 <!--199--><AD_REFERENCE>
@@ -1343,6 +1628,8 @@
 <!--199-->  <NAME><![CDATA[M_PriceList_Version for Client]]></NAME>
 <!--199-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--199-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--199-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--199-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--199--></AD_REFERENCE>
 
 <!--200--><AD_REFERENCE>
@@ -1353,6 +1640,8 @@
 <!--200-->  <NAME><![CDATA[C_Charge]]></NAME>
 <!--200-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--200-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--200-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--200-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--200--></AD_REFERENCE>
 
 <!--201--><AD_REFERENCE>
@@ -1363,6 +1652,8 @@
 <!--201-->  <NAME><![CDATA[C_BP_EDI EDI Type]]></NAME>
 <!--201-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--201-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--201-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--201-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--201--></AD_REFERENCE>
 
 <!--202--><AD_REFERENCE>
@@ -1373,6 +1664,8 @@
 <!--202-->  <NAME><![CDATA[M_EDI Status]]></NAME>
 <!--202-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--202-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--202-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--202-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--202--></AD_REFERENCE>
 
 <!--203--><AD_REFERENCE>
@@ -1383,6 +1676,8 @@
 <!--203-->  <NAME><![CDATA[M_EDI Trx Type]]></NAME>
 <!--203-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--203-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--203-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--203-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--203--></AD_REFERENCE>
 
 <!--204--><AD_REFERENCE>
@@ -1394,6 +1689,8 @@
 <!--204-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--204-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--204-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--204-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--204-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--204--></AD_REFERENCE>
 
 <!--205--><AD_REFERENCE>
@@ -1405,6 +1702,8 @@
 <!--205-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--205-->  <VFORMAT><![CDATA[CC]]></VFORMAT>
 <!--205-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--205-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--205-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--205--></AD_REFERENCE>
 
 <!--206--><AD_REFERENCE>
@@ -1416,6 +1715,8 @@
 <!--206-->  <DESCRIPTION><![CDATA[Posting Tables]]></DESCRIPTION>
 <!--206-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--206-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--206-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--206-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--206--></AD_REFERENCE>
 
 <!--207--><AD_REFERENCE>
@@ -1426,6 +1727,8 @@
 <!--207-->  <NAME><![CDATA[GL Category Type]]></NAME>
 <!--207-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--207-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--207-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--207-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--207--></AD_REFERENCE>
 
 <!--208--><AD_REFERENCE>
@@ -1437,6 +1740,8 @@
 <!--208-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--208-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--208-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--208-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--208-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--208--></AD_REFERENCE>
 
 <!--209--><AD_REFERENCE>
@@ -1448,6 +1753,8 @@
 <!--209-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--209-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--209-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--209-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--209-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--209--></AD_REFERENCE>
 
 <!--210--><AD_REFERENCE>
@@ -1459,6 +1766,8 @@
 <!--210-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--210-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--210-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--210-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--210-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--210--></AD_REFERENCE>
 
 <!--211--><AD_REFERENCE>
@@ -1470,6 +1779,8 @@
 <!--211-->  <DESCRIPTION><![CDATA[Products that are BOMs and stocked]]></DESCRIPTION>
 <!--211-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--211-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--211-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--211-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--211--></AD_REFERENCE>
 
 <!--212--><AD_REFERENCE>
@@ -1481,6 +1792,8 @@
 <!--212-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--212-->  <VFORMAT><![CDATA[c]]></VFORMAT>
 <!--212-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--212-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--212-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--212--></AD_REFERENCE>
 
 <!--213--><AD_REFERENCE>
@@ -1491,6 +1804,8 @@
 <!--213-->  <NAME><![CDATA[C_Payment AVS]]></NAME>
 <!--213-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--213-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--213-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--213-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--213--></AD_REFERENCE>
 
 <!--214--><AD_REFERENCE>
@@ -1501,6 +1816,8 @@
 <!--214-->  <NAME><![CDATA[C_Payment Tender Type]]></NAME>
 <!--214-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--214-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--214-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--214-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--214--></AD_REFERENCE>
 
 <!--215--><AD_REFERENCE>
@@ -1511,6 +1828,8 @@
 <!--215-->  <NAME><![CDATA[C_Payment Trx Type]]></NAME>
 <!--215-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--215-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--215-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--215-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--215--></AD_REFERENCE>
 
 <!--216--><AD_REFERENCE>
@@ -1521,6 +1840,8 @@
 <!--216-->  <NAME><![CDATA[C_Bank Account Type]]></NAME>
 <!--216-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--216-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--216-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--216-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--216--></AD_REFERENCE>
 
 <!--217--><AD_REFERENCE>
@@ -1531,6 +1852,8 @@
 <!--217-->  <NAME><![CDATA[C_Cash Trx Type]]></NAME>
 <!--217-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--217-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--217-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--217-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--217--></AD_REFERENCE>
 
 <!--218--><AD_REFERENCE>
@@ -1542,6 +1865,8 @@
 <!--218-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--218-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--218-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--218-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--218-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--218--></AD_REFERENCE>
 
 <!--219--><AD_REFERENCE>
@@ -1553,6 +1878,8 @@
 <!--219-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--219-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--219-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--219-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--219-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--219--></AD_REFERENCE>
 
 <!--220--><AD_REFERENCE>
@@ -1563,6 +1890,8 @@
 <!--220-->  <NAME><![CDATA[R_Request Action Type]]></NAME>
 <!--220-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--220-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--220-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--220-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--220--></AD_REFERENCE>
 
 <!--221--><AD_REFERENCE>
@@ -1574,6 +1903,8 @@
 <!--221-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--221-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--221-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--221-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--221-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--221--></AD_REFERENCE>
 
 <!--222--><AD_REFERENCE>
@@ -1585,6 +1916,8 @@
 <!--222-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--222-->  <VFORMAT><![CDATA[9]]></VFORMAT>
 <!--222-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--222-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--222-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--222--></AD_REFERENCE>
 
 <!--223--><AD_REFERENCE>
@@ -1596,6 +1929,8 @@
 <!--223-->  <DESCRIPTION><![CDATA[Vendor selection]]></DESCRIPTION>
 <!--223-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--223-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--223-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--223-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--223--></AD_REFERENCE>
 
 <!--224--><AD_REFERENCE>
@@ -1607,6 +1942,8 @@
 <!--224-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--224-->  <VFORMAT><![CDATA[A]]></VFORMAT>
 <!--224-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--224-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--224-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--224--></AD_REFERENCE>
 
 <!--225--><AD_REFERENCE>
@@ -1618,6 +1955,8 @@
 <!--225-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--225-->  <VFORMAT><![CDATA[A]]></VFORMAT>
 <!--225-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--225-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--225-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--225--></AD_REFERENCE>
 
 <!--226--><AD_REFERENCE>
@@ -1628,6 +1967,8 @@
 <!--226-->  <NAME><![CDATA[AD_Role User Level]]></NAME>
 <!--226-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--226-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--226-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--226-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--226--></AD_REFERENCE>
 
 <!--227--><AD_REFERENCE>
@@ -1638,6 +1979,8 @@
 <!--227-->  <NAME><![CDATA[C_PaymentTerm]]></NAME>
 <!--227-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--227-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--227-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--227-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--227--></AD_REFERENCE>
 
 <!--228--><AD_REFERENCE>
@@ -1648,6 +1991,8 @@
 <!--228-->  <NAME><![CDATA[PA_Goal]]></NAME>
 <!--228-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--228-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--228-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--228-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--228--></AD_REFERENCE>
 
 <!--229--><AD_REFERENCE>
@@ -1658,6 +2003,8 @@
 <!--229-->  <NAME><![CDATA[PA_Achievement Parent]]></NAME>
 <!--229-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--229-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--229-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--229-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--229--></AD_REFERENCE>
 
 <!--230--><AD_REFERENCE>
@@ -1668,6 +2015,8 @@
 <!--230-->  <NAME><![CDATA[PA_Goal Parent]]></NAME>
 <!--230-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--230-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--230-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--230-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--230--></AD_REFERENCE>
 
 <!--231--><AD_REFERENCE>
@@ -1678,6 +2027,8 @@
 <!--231-->  <NAME><![CDATA[PA_Measure Type]]></NAME>
 <!--231-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--231-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--231-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--231-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--231--></AD_REFERENCE>
 
 <!--232--><AD_REFERENCE>
@@ -1689,6 +2040,8 @@
 <!--232-->  <DESCRIPTION><![CDATA[Vendor or SalesRep selection]]></DESCRIPTION>
 <!--232-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--232-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--232-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--232-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--232--></AD_REFERENCE>
 
 <!--233--><AD_REFERENCE>
@@ -1700,6 +2053,8 @@
 <!--233-->  <DESCRIPTION><![CDATA[Periods Sorted by Date]]></DESCRIPTION>
 <!--233-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--233-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--233-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--233-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--233--></AD_REFERENCE>
 
 <!--234--><AD_REFERENCE>
@@ -1713,6 +2068,8 @@
 <!--234-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--234-->  <VFORMAT><![CDATA[c]]></VFORMAT>
 <!--234-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--234-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--234-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--234--></AD_REFERENCE>
 
 <!--235--><AD_REFERENCE>
@@ -1723,6 +2080,8 @@
 <!--235-->  <NAME><![CDATA[PA_Report AmountType]]></NAME>
 <!--235-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--235-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--235-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--235-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--235--></AD_REFERENCE>
 
 <!--236--><AD_REFERENCE>
@@ -1733,6 +2092,8 @@
 <!--236-->  <NAME><![CDATA[PA_Report CalculationType]]></NAME>
 <!--236-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--236-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--236-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--236-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--236--></AD_REFERENCE>
 
 <!--237--><AD_REFERENCE>
@@ -1743,6 +2104,8 @@
 <!--237-->  <NAME><![CDATA[PA_Report ColumnType]]></NAME>
 <!--237-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--237-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--237-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--237-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--237--></AD_REFERENCE>
 
 <!--238--><AD_REFERENCE>
@@ -1753,6 +2116,8 @@
 <!--238-->  <NAME><![CDATA[PA_Report CurrencyType]]></NAME>
 <!--238-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--238-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--238-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--238-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--238--></AD_REFERENCE>
 
 <!--239--><AD_REFERENCE>
@@ -1763,6 +2128,8 @@
 <!--239-->  <NAME><![CDATA[PA_ReportColumn]]></NAME>
 <!--239-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--239-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--239-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--239-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--239--></AD_REFERENCE>
 
 <!--240--><AD_REFERENCE>
@@ -1773,6 +2140,8 @@
 <!--240-->  <NAME><![CDATA[PA_ReportLine]]></NAME>
 <!--240-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--240-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--240-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--240-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--240--></AD_REFERENCE>
 
 <!--241--><AD_REFERENCE>
@@ -1783,6 +2152,8 @@
 <!--241-->  <NAME><![CDATA[PA_Report LineType]]></NAME>
 <!--241-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--241-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--241-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--241-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--241--></AD_REFERENCE>
 
 <!--242--><AD_REFERENCE>
@@ -1793,6 +2164,8 @@
 <!--242-->  <NAME><![CDATA[PA_ReportLine Parent]]></NAME>
 <!--242-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--242-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--242-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--242-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--242--></AD_REFERENCE>
 
 <!--243--><AD_REFERENCE>
@@ -1803,6 +2176,8 @@
 <!--243-->  <NAME><![CDATA[AD_Color Type]]></NAME>
 <!--243-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--243-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--243-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--243-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--243--></AD_REFERENCE>
 
 <!--244--><AD_REFERENCE>
@@ -1813,6 +2188,8 @@
 <!--244-->  <NAME><![CDATA[AD_Column Key ColumnNames]]></NAME>
 <!--244-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--244-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--244-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--244-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--244--></AD_REFERENCE>
 
 <!--245--><AD_REFERENCE>
@@ -1825,6 +2202,8 @@
 <!--245-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--245-->  <VFORMAT><![CDATA[A]]></VFORMAT>
 <!--245-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--245-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--245-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--245--></AD_REFERENCE>
 
 <!--246--><AD_REFERENCE>
@@ -1836,6 +2215,8 @@
 <!--246-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--246-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--246-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--246-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--246-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--246--></AD_REFERENCE>
 
 <!--247--><AD_REFERENCE>
@@ -1847,6 +2228,8 @@
 <!--247-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--247-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--247-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--247-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--247-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--247--></AD_REFERENCE>
 
 <!--248--><AD_REFERENCE>
@@ -1858,6 +2241,8 @@
 <!--248-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--248-->  <VFORMAT><![CDATA[0]]></VFORMAT>
 <!--248-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--248-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--248-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--248--></AD_REFERENCE>
 
 <!--249--><AD_REFERENCE>
@@ -1868,6 +2253,8 @@
 <!--249-->  <NAME><![CDATA[M_DiscountSchema]]></NAME>
 <!--249-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--249-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--249-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--249-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--249--></AD_REFERENCE>
 
 <!--250--><AD_REFERENCE>
@@ -1878,6 +2265,8 @@
 <!--250-->  <NAME><![CDATA[M_Product_Costing Source]]></NAME>
 <!--250-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--250-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--250-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--250-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--250--></AD_REFERENCE>
 
 <!--251--><AD_REFERENCE>
@@ -1889,6 +2278,8 @@
 <!--251-->  <DESCRIPTION><![CDATA[Column selection]]></DESCRIPTION>
 <!--251-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--251-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--251-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--251-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--251--></AD_REFERENCE>
 
 <!--252--><AD_REFERENCE>
@@ -1900,6 +2291,8 @@
 <!--252-->  <DESCRIPTION><![CDATA[Business Partners who are Employee]]></DESCRIPTION>
 <!--252-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--252-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--252-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--252-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--252--></AD_REFERENCE>
 
 <!--253--><AD_REFERENCE>
@@ -1910,6 +2303,8 @@
 <!--253-->  <NAME><![CDATA[AD_Print Field Alignment]]></NAME>
 <!--253-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--253-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--253-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--253-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--253--></AD_REFERENCE>
 
 <!--254--><AD_REFERENCE>
@@ -1920,6 +2315,8 @@
 <!--254-->  <NAME><![CDATA[AD_Print Line Alignment]]></NAME>
 <!--254-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--254-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--254-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--254-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--254--></AD_REFERENCE>
 
 <!--255--><AD_REFERENCE>
@@ -1930,6 +2327,8 @@
 <!--255-->  <NAME><![CDATA[AD_Print Format Type]]></NAME>
 <!--255-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--255-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--255-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--255-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--255--></AD_REFERENCE>
 
 <!--256--><AD_REFERENCE>
@@ -1940,6 +2339,8 @@
 <!--256-->  <NAME><![CDATA[AD_Print Area]]></NAME>
 <!--256-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--256-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--256-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--256-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--256--></AD_REFERENCE>
 
 <!--257--><AD_REFERENCE>
@@ -1951,6 +2352,8 @@
 <!--257-->  <DESCRIPTION><![CDATA[Integer Type only (Name)]]></DESCRIPTION>
 <!--257-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--257-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--257-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--257-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--257--></AD_REFERENCE>
 
 <!--258--><AD_REFERENCE>
@@ -1962,6 +2365,8 @@
 <!--258-->  <DESCRIPTION><![CDATA[Coluns YesNo (Name)]]></DESCRIPTION>
 <!--258-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--258-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--258-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--258-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--258--></AD_REFERENCE>
 
 <!--259--><AD_REFERENCE>
@@ -1972,6 +2377,8 @@
 <!--259-->  <NAME><![CDATA[AD_PrintFormat]]></NAME>
 <!--259-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--259-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--259-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--259-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--259--></AD_REFERENCE>
 
 <!--261--><AD_REFERENCE>
@@ -1982,6 +2389,8 @@
 <!--261-->  <NAME><![CDATA[AD_PrintFormat Invoice]]></NAME>
 <!--261-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--261-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--261-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--261-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--261--></AD_REFERENCE>
 
 <!--262--><AD_REFERENCE>
@@ -1992,6 +2401,8 @@
 <!--262-->  <NAME><![CDATA[AD_PrintFormat Order]]></NAME>
 <!--262-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--262-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--262-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--262-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--262--></AD_REFERENCE>
 
 <!--263--><AD_REFERENCE>
@@ -2002,6 +2413,8 @@
 <!--263-->  <NAME><![CDATA[AD_PrintFormat Shipment]]></NAME>
 <!--263-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--263-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--263-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--263-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--263--></AD_REFERENCE>
 
 <!--264--><AD_REFERENCE>
@@ -2012,6 +2425,8 @@
 <!--264-->  <NAME><![CDATA[AD_PrintFormatItem]]></NAME>
 <!--264-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--264-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--264-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--264-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--264--></AD_REFERENCE>
 
 <!--265--><AD_REFERENCE>
@@ -2022,6 +2437,8 @@
 <!--265-->  <NAME><![CDATA[AD_Print Graph Type]]></NAME>
 <!--265-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--265-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--265-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--265-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--265--></AD_REFERENCE>
 
 <!--266--><AD_REFERENCE>
@@ -2032,6 +2449,8 @@
 <!--266-->  <NAME><![CDATA[AD_PrintColor]]></NAME>
 <!--266-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--266-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--266-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--266-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--266--></AD_REFERENCE>
 
 <!--267--><AD_REFERENCE>
@@ -2042,6 +2461,8 @@
 <!--267-->  <NAME><![CDATA[AD_PrintFont]]></NAME>
 <!--267-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--267-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--267-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--267-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--267--></AD_REFERENCE>
 
 <!--268--><AD_REFERENCE>
@@ -2052,6 +2473,8 @@
 <!--268-->  <NAME><![CDATA[AD_PrintFormat Check]]></NAME>
 <!--268-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--268-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--268-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--268-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--268--></AD_REFERENCE>
 
 <!--269--><AD_REFERENCE>
@@ -2062,6 +2485,8 @@
 <!--269-->  <NAME><![CDATA[AD_PrintFormat Not TableBased]]></NAME>
 <!--269-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--269-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--269-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--269-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--269--></AD_REFERENCE>
 
 <!--270--><AD_REFERENCE>
@@ -2072,6 +2497,8 @@
 <!--270-->  <NAME><![CDATA[M_Product_ProductType]]></NAME>
 <!--270-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--270-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--270-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--270-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--270--></AD_REFERENCE>
 
 <!--271--><AD_REFERENCE>
@@ -2083,6 +2510,8 @@
 <!--271-->  <DESCRIPTION><![CDATA[Order Line]]></DESCRIPTION>
 <!--271-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--271-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--271-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--271-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--271--></AD_REFERENCE>
 
 <!--272--><AD_REFERENCE>
@@ -2093,6 +2522,8 @@
 <!--272-->  <NAME><![CDATA[I_ElementValue Column]]></NAME>
 <!--272-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--272-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--272-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--272-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--272--></AD_REFERENCE>
 
 <!--273--><AD_REFERENCE>
@@ -2104,6 +2535,8 @@
 <!--273-->  <DESCRIPTION><![CDATA[Account selection]]></DESCRIPTION>
 <!--273-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--273-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--273-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--273-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--273--></AD_REFERENCE>
 
 <!--274--><AD_REFERENCE>
@@ -2115,6 +2548,8 @@
 <!--274-->  <DESCRIPTION><![CDATA[Mail Text]]></DESCRIPTION>
 <!--274-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--274-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--274-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--274-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--274--></AD_REFERENCE>
 
 <!--275--><AD_REFERENCE>
@@ -2126,6 +2561,8 @@
 <!--275-->  <DESCRIPTION><![CDATA[Periods Sorted by Date]]></DESCRIPTION>
 <!--275-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--275-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--275-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--275-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--275--></AD_REFERENCE>
 
 <!--276--><AD_REFERENCE>
@@ -2137,6 +2574,8 @@
 <!--276-->  <DESCRIPTION><![CDATA[Organization selection]]></DESCRIPTION>
 <!--276-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--276-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--276-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--276-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--276--></AD_REFERENCE>
 
 <!--277--><AD_REFERENCE>
@@ -2148,6 +2587,8 @@
 <!--277-->  <DESCRIPTION><![CDATA[Business Partners who are Employee and have addresses]]></DESCRIPTION>
 <!--277-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--277-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--277-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--277-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--277--></AD_REFERENCE>
 
 <!--278--><AD_REFERENCE>
@@ -2158,6 +2599,8 @@
 <!--278-->  <NAME><![CDATA[AD_Tab]]></NAME>
 <!--278-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--278-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--278-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--278-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--278--></AD_REFERENCE>
 
 <!--279--><AD_REFERENCE>
@@ -2168,6 +2611,8 @@
 <!--279-->  <NAME><![CDATA[M_Product BOM Type]]></NAME>
 <!--279-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--279-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--279-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--279-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--279--></AD_REFERENCE>
 
 <!--280--><AD_REFERENCE>
@@ -2178,6 +2623,8 @@
 <!--280-->  <NAME><![CDATA[AD_Print Label Line Type]]></NAME>
 <!--280-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--280-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--280-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--280-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--280--></AD_REFERENCE>
 
 <!--282--><AD_REFERENCE>
@@ -2188,6 +2635,8 @@
 <!--282-->  <NAME><![CDATA[C_Recurring Type]]></NAME>
 <!--282-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--282-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--282-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--282-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--282--></AD_REFERENCE>
 
 <!--283--><AD_REFERENCE>
@@ -2198,6 +2647,8 @@
 <!--283-->  <NAME><![CDATA[C_Recurring Frequency]]></NAME>
 <!--283-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--283-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--283-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--283-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--283--></AD_REFERENCE>
 
 <!--284--><AD_REFERENCE>
@@ -2208,6 +2659,8 @@
 <!--284-->  <NAME><![CDATA[AD_Window]]></NAME>
 <!--284-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--284-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--284-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--284-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--284--></AD_REFERENCE>
 
 <!--285--><AD_REFERENCE>
@@ -2218,6 +2671,8 @@
 <!--285-->  <NAME><![CDATA[K_Entry Related]]></NAME>
 <!--285-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--285-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--285-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--285-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--285--></AD_REFERENCE>
 
 <!--286--><AD_REFERENCE>
@@ -2229,6 +2684,8 @@
 <!--286-->  <DESCRIPTION><![CDATA[Employee or SalesRep]]></DESCRIPTION>
 <!--286-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--286-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--286-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--286-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--286--></AD_REFERENCE>
 
 <!--287--><AD_REFERENCE>
@@ -2239,6 +2696,8 @@
 <!--287-->  <NAME><![CDATA[C_Tax SPPOType]]></NAME>
 <!--287-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--287-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--287-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--287-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--287--></AD_REFERENCE>
 
 <!--288--><AD_REFERENCE>
@@ -2249,6 +2708,8 @@
 <!--288-->  <NAME><![CDATA[C_ProjectType Category]]></NAME>
 <!--288-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--288-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--288-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--288-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--288--></AD_REFERENCE>
 
 <!--289--><AD_REFERENCE>
@@ -2260,6 +2721,8 @@
 <!--289-->  <DESCRIPTION><![CDATA[Sales Credit Status]]></DESCRIPTION>
 <!--289-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--289-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--289-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--289-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--289--></AD_REFERENCE>
 
 <!--290--><AD_REFERENCE>
@@ -2271,6 +2734,8 @@
 <!--290-->  <DESCRIPTION><![CDATA[Purchase orders]]></DESCRIPTION>
 <!--290-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--290-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--290-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--290-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--290--></AD_REFERENCE>
 
 <!--800000--><AD_REFERENCE>
@@ -2282,6 +2747,8 @@
 <!--800000-->  <DESCRIPTION><![CDATA[UOM order]]></DESCRIPTION>
 <!--800000-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800000-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800000--></AD_REFERENCE>
 
 <!--800001--><AD_REFERENCE>
@@ -2294,6 +2761,8 @@
 <!--800001-->  <HELP><![CDATA[Parent Taxes]]></HELP>
 <!--800001-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800001-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800001-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800001-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800001--></AD_REFERENCE>
 
 <!--800002--><AD_REFERENCE>
@@ -2304,6 +2773,8 @@
 <!--800002-->  <NAME><![CDATA[ProjectStatus]]></NAME>
 <!--800002-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800002-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800002-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800002-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800002--></AD_REFERENCE>
 
 <!--800003--><AD_REFERENCE>
@@ -2314,6 +2785,8 @@
 <!--800003-->  <NAME><![CDATA[Projectphase]]></NAME>
 <!--800003-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800003-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800003-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800003-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800003--></AD_REFERENCE>
 
 <!--800004--><AD_REFERENCE>
@@ -2324,6 +2797,8 @@
 <!--800004-->  <NAME><![CDATA[Projectkind]]></NAME>
 <!--800004-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800004-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800004-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800004-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800004--></AD_REFERENCE>
 
 <!--800005--><AD_REFERENCE>
@@ -2334,6 +2809,8 @@
 <!--800005-->  <NAME><![CDATA[PublicPrivate]]></NAME>
 <!--800005-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800005-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800005-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800005-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800005--></AD_REFERENCE>
 
 <!--800007--><AD_REFERENCE>
@@ -2344,6 +2821,8 @@
 <!--800007-->  <NAME><![CDATA[Print Format Invoice]]></NAME>
 <!--800007-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800007-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800007-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800007-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800007--></AD_REFERENCE>
 
 <!--800008--><AD_REFERENCE>
@@ -2356,6 +2835,10 @@
 <!--800008-->  <HELP><![CDATA[Price]]></HELP>
 <!--800008-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--800008-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800008-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--800008-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BigDecimalDomainType]]></MODEL_IMPL>
+<!--800008-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADPrice]]></WAD_IMPL>
+<!--800008-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIPrice]]></UI_IMPL>
 <!--800008--></AD_REFERENCE>
 
 <!--800009--><AD_REFERENCE>
@@ -2366,6 +2849,8 @@
 <!--800009-->  <NAME><![CDATA[Product_Template_Type]]></NAME>
 <!--800009-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800009-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800009-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800009-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800009--></AD_REFERENCE>
 
 <!--800010--><AD_REFERENCE>
@@ -2376,6 +2861,8 @@
 <!--800010-->  <NAME><![CDATA[Settlement type]]></NAME>
 <!--800010-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800010-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800010-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800010-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800010--></AD_REFERENCE>
 
 <!--800011--><AD_REFERENCE>
@@ -2386,6 +2873,8 @@
 <!--800011-->  <NAME><![CDATA[Product Complete]]></NAME>
 <!--800011-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800011-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800011-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800011-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800011--></AD_REFERENCE>
 
 <!--800012--><AD_REFERENCE>
@@ -2396,6 +2885,8 @@
 <!--800012-->  <NAME><![CDATA[Type maintenance]]></NAME>
 <!--800012-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800012-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800012-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800012-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800012--></AD_REFERENCE>
 
 <!--800014--><AD_REFERENCE>
@@ -2407,6 +2898,8 @@
 <!--800014-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800014-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800014-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800014-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800014-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800014--></AD_REFERENCE>
 
 <!--800015--><AD_REFERENCE>
@@ -2418,6 +2911,8 @@
 <!--800015-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800015-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800015-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800015-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800015-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800015--></AD_REFERENCE>
 
 <!--800016--><AD_REFERENCE>
@@ -2429,6 +2924,8 @@
 <!--800016-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800016-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800016-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800016-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800016-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800016--></AD_REFERENCE>
 
 <!--800017--><AD_REFERENCE>
@@ -2439,6 +2936,8 @@
 <!--800017-->  <NAME><![CDATA[Strorage Payment Rule]]></NAME>
 <!--800017-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800017-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800017-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800017-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800017--></AD_REFERENCE>
 
 <!--800018--><AD_REFERENCE>
@@ -2449,6 +2948,8 @@
 <!--800018-->  <NAME><![CDATA[DocumentDocTypeCopy]]></NAME>
 <!--800018-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800018-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800018-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800018-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800018--></AD_REFERENCE>
 
 <!--800019--><AD_REFERENCE>
@@ -2460,6 +2961,10 @@
 <!--800019-->  <DESCRIPTION><![CDATA[General Quantity]]></DESCRIPTION>
 <!--800019-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--800019-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800019-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--800019-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.BigDecimalDomainType]]></MODEL_IMPL>
+<!--800019-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADGeneralQuantity]]></WAD_IMPL>
+<!--800019-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIGeneralQuantity]]></UI_IMPL>
 <!--800019--></AD_REFERENCE>
 
 <!--800020--><AD_REFERENCE>
@@ -2470,6 +2975,8 @@
 <!--800020-->  <NAME><![CDATA[Invoicingmode]]></NAME>
 <!--800020-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800020-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800020-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800020-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800020--></AD_REFERENCE>
 
 <!--800021--><AD_REFERENCE>
@@ -2480,6 +2987,8 @@
 <!--800021-->  <NAME><![CDATA[Invoicingtype]]></NAME>
 <!--800021-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800021-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800021-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800021-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800021--></AD_REFERENCE>
 
 <!--800022--><AD_REFERENCE>
@@ -2490,6 +2999,8 @@
 <!--800022-->  <NAME><![CDATA[AD_Table Posting TRL]]></NAME>
 <!--800022-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800022-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800022-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800022-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800022--></AD_REFERENCE>
 
 <!--800023--><AD_REFERENCE>
@@ -2500,6 +3011,8 @@
 <!--800023-->  <NAME><![CDATA[Bankingrule]]></NAME>
 <!--800023-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800023-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800023-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800023-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800023--></AD_REFERENCE>
 
 <!--800024--><AD_REFERENCE>
@@ -2510,6 +3023,8 @@
 <!--800024-->  <NAME><![CDATA[All_Processed_Status]]></NAME>
 <!--800024-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800024-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800024-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800024-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800024--></AD_REFERENCE>
 
 <!--800025--><AD_REFERENCE>
@@ -2520,6 +3035,8 @@
 <!--800025-->  <NAME><![CDATA[Cost Type]]></NAME>
 <!--800025-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800025-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800025-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800025-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800025--></AD_REFERENCE>
 
 <!--800026--><AD_REFERENCE>
@@ -2549,6 +3066,8 @@
 For example, if you want to create different invoices for each ship location for a customer, use the value "By ship location" (000010000000000)]]></HELP>
 <!--800026-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800026-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800026-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800026-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800026--></AD_REFERENCE>
 
 <!--800027--><AD_REFERENCE>
@@ -2560,6 +3079,8 @@
 <!--800027-->  <DESCRIPTION><![CDATA[Quarter o trimester year]]></DESCRIPTION>
 <!--800027-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800027-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800027-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800027-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800027--></AD_REFERENCE>
 
 <!--800028--><AD_REFERENCE>
@@ -2571,6 +3092,8 @@
 <!--800028-->  <DESCRIPTION><![CDATA[List of all forms]]></DESCRIPTION>
 <!--800028-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800028-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800028-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800028-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800028--></AD_REFERENCE>
 
 <!--800029--><AD_REFERENCE>
@@ -2581,6 +3104,8 @@
 <!--800029-->  <NAME><![CDATA[Offers]]></NAME>
 <!--800029-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800029-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800029-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800029-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800029--></AD_REFERENCE>
 
 <!--800030--><AD_REFERENCE>
@@ -2591,6 +3116,8 @@
 <!--800030-->  <NAME><![CDATA[IsManager]]></NAME>
 <!--800030-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800030-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800030-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800030-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800030--></AD_REFERENCE>
 
 <!--800031--><AD_REFERENCE>
@@ -2602,6 +3129,8 @@
 <!--800031-->  <DESCRIPTION><![CDATA[Purchase order price lists.]]></DESCRIPTION>
 <!--800031-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800031-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800031-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800031-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800031--></AD_REFERENCE>
 
 <!--800032--><AD_REFERENCE>
@@ -2613,6 +3142,8 @@
 <!--800032-->  <DESCRIPTION><![CDATA[Cost Centers]]></DESCRIPTION>
 <!--800032-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800032-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800032-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800032-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800032--></AD_REFERENCE>
 
 <!--800033--><AD_REFERENCE>
@@ -2625,6 +3156,8 @@
 <!--800033-->  <HELP><![CDATA[Maintenance type]]></HELP>
 <!--800033-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800033-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800033-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800033-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800033--></AD_REFERENCE>
 
 <!--800034--><AD_REFERENCE>
@@ -2637,6 +3170,8 @@
 <!--800034-->  <HELP><![CDATA[Production types]]></HELP>
 <!--800034-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800034-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800034-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800034-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800034--></AD_REFERENCE>
 
 <!--800035--><AD_REFERENCE>
@@ -2649,6 +3184,8 @@
 <!--800035-->  <HELP><![CDATA[Partners that are Workers]]></HELP>
 <!--800035-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800035-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800035-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800035-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800035--></AD_REFERENCE>
 
 <!--800037--><AD_REFERENCE>
@@ -2660,6 +3197,8 @@
 <!--800037-->  <DESCRIPTION><![CDATA[Work Requirement type list]]></DESCRIPTION>
 <!--800037-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800037-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800037-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800037-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800037--></AD_REFERENCE>
 
 <!--800038--><AD_REFERENCE>
@@ -2672,6 +3211,8 @@
 <!--800038-->  <HELP><![CDATA[Work shift]]></HELP>
 <!--800038-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800038-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800038-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800038-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800038--></AD_REFERENCE>
 
 <!--800039--><AD_REFERENCE>
@@ -2684,6 +3225,8 @@
 <!--800039-->  <HELP><![CDATA[Indicates the value type that it's going to be entered]]></HELP>
 <!--800039-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800039-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800039-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800039-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800039--></AD_REFERENCE>
 
 <!--800040--><AD_REFERENCE>
@@ -2695,6 +3238,8 @@
 <!--800040-->  <DESCRIPTION><![CDATA[It shows the different types of amortization.]]></DESCRIPTION>
 <!--800040-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800040-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800040-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800040-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800040--></AD_REFERENCE>
 
 <!--800041--><AD_REFERENCE>
@@ -2705,6 +3250,8 @@
 <!--800041-->  <NAME><![CDATA[Amortization schedule]]></NAME>
 <!--800041-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800041-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800041-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800041-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800041--></AD_REFERENCE>
 
 <!--800042--><AD_REFERENCE>
@@ -2715,6 +3262,8 @@
 <!--800042-->  <NAME><![CDATA[Create/recalculate amortization]]></NAME>
 <!--800042-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800042-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800042-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800042-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800042--></AD_REFERENCE>
 
 <!--800046--><AD_REFERENCE>
@@ -2725,6 +3274,8 @@
 <!--800046-->  <NAME><![CDATA[C_BankAccount]]></NAME>
 <!--800046-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800046-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800046-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800046-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800046--></AD_REFERENCE>
 
 <!--800057--><AD_REFERENCE>
@@ -2736,6 +3287,8 @@
 <!--800057-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800057-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800057-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800057-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800057-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800057--></AD_REFERENCE>
 
 <!--800058--><AD_REFERENCE>
@@ -2747,6 +3300,8 @@
 <!--800058-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800058-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800058-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800058-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800058-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800058--></AD_REFERENCE>
 
 <!--800059--><AD_REFERENCE>
@@ -2758,6 +3313,8 @@
 <!--800059-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800059-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800059-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800059-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800059-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800059--></AD_REFERENCE>
 
 <!--800060--><AD_REFERENCE>
@@ -2769,6 +3326,8 @@
 <!--800060-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800060-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800060-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800060-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800060-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800060--></AD_REFERENCE>
 
 <!--800061--><AD_REFERENCE>
@@ -2780,6 +3339,8 @@
 <!--800061-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800061-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800061-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800061-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800061-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800061--></AD_REFERENCE>
 
 <!--800062--><AD_REFERENCE>
@@ -2791,6 +3352,8 @@
 <!--800062-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800062-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800062-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800062-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800062-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800062--></AD_REFERENCE>
 
 <!--800063--><AD_REFERENCE>
@@ -2802,6 +3365,8 @@
 <!--800063-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800063-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800063-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800063-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800063-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800063--></AD_REFERENCE>
 
 <!--800064--><AD_REFERENCE>
@@ -2813,6 +3378,8 @@
 <!--800064-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800064-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800064-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800064-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800064-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800064--></AD_REFERENCE>
 
 <!--800065--><AD_REFERENCE>
@@ -2823,6 +3390,8 @@
 <!--800065-->  <NAME><![CDATA[Maintenance Periodicity]]></NAME>
 <!--800065-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800065-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800065-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800065-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800065--></AD_REFERENCE>
 
 <!--800066--><AD_REFERENCE>
@@ -2834,6 +3403,8 @@
 <!--800066-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800066-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800066-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800066-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800066-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800066--></AD_REFERENCE>
 
 <!--800067--><AD_REFERENCE>
@@ -2846,6 +3417,8 @@
 <!--800067-->  <HELP><![CDATA[Types of rappels]]></HELP>
 <!--800067-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800067-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800067-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800067-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800067--></AD_REFERENCE>
 
 <!--800068--><AD_REFERENCE>
@@ -2856,6 +3429,8 @@
 <!--800068-->  <NAME><![CDATA[AmortizationCalcType]]></NAME>
 <!--800068-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800068-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800068-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800068-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800068--></AD_REFERENCE>
 
 <!--800069--><AD_REFERENCE>
@@ -2866,6 +3441,8 @@
 <!--800069-->  <NAME><![CDATA[Budget_Type]]></NAME>
 <!--800069-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800069-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800069-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800069-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800069--></AD_REFERENCE>
 
 <!--800070--><AD_REFERENCE>
@@ -2876,6 +3453,8 @@
 <!--800070-->  <NAME><![CDATA[C_DP_Management_Status]]></NAME>
 <!--800070-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800070-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800070-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800070-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800070--></AD_REFERENCE>
 
 <!--800071--><AD_REFERENCE>
@@ -2886,6 +3465,8 @@
 <!--800071-->  <NAME><![CDATA[Freight_Unit]]></NAME>
 <!--800071-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800071-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800071-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800071-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800071--></AD_REFERENCE>
 
 <!--800072--><AD_REFERENCE>
@@ -2896,6 +3477,8 @@
 <!--800072-->  <NAME><![CDATA[Freight round]]></NAME>
 <!--800072-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800072-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800072-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800072-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800072--></AD_REFERENCE>
 
 <!--800073--><AD_REFERENCE>
@@ -2906,6 +3489,8 @@
 <!--800073-->  <NAME><![CDATA[C_Debt_Payment]]></NAME>
 <!--800073-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800073-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800073-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800073-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800073--></AD_REFERENCE>
 
 <!--800074--><AD_REFERENCE>
@@ -2917,6 +3502,8 @@
 <!--800074-->  <DESCRIPTION><![CDATA[Accounting model period]]></DESCRIPTION>
 <!--800074-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800074-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800074-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800074-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800074--></AD_REFERENCE>
 
 <!--800075--><AD_REFERENCE>
@@ -2928,6 +3515,8 @@
 <!--800075-->  <DESCRIPTION><![CDATA[State of one order]]></DESCRIPTION>
 <!--800075-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800075-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800075-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800075-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800075--></AD_REFERENCE>
 
 <!--800076--><AD_REFERENCE>
@@ -2938,6 +3527,8 @@
 <!--800076-->  <NAME><![CDATA[C_Remittance no canceled or returned]]></NAME>
 <!--800076-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800076-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800076-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800076-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800076--></AD_REFERENCE>
 
 <!--800078--><AD_REFERENCE>
@@ -2948,6 +3539,8 @@
 <!--800078-->  <NAME><![CDATA[Order status]]></NAME>
 <!--800078-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800078-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800078-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800078-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800078--></AD_REFERENCE>
 
 <!--800079--><AD_REFERENCE>
@@ -2958,6 +3551,8 @@
 <!--800079-->  <NAME><![CDATA[AT_Test]]></NAME>
 <!--800079-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800079-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800079-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800079-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800079--></AD_REFERENCE>
 
 <!--800080--><AD_REFERENCE>
@@ -2969,6 +3564,8 @@
 <!--800080-->  <DESCRIPTION><![CDATA[Defines if the Test Line is a command line or a reference to execute another Test.]]></DESCRIPTION>
 <!--800080-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800080-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800080-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800080-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800080--></AD_REFERENCE>
 
 <!--800081--><AD_REFERENCE>
@@ -2980,6 +3577,8 @@
 <!--800081-->  <DESCRIPTION><![CDATA[It defines the category of the test. It can be individual, module or application.]]></DESCRIPTION>
 <!--800081-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800081-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800081-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800081-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800081--></AD_REFERENCE>
 
 <!--800082--><AD_REFERENCE>
@@ -2990,6 +3589,8 @@
 <!--800082-->  <NAME><![CDATA[AD_Language_Using]]></NAME>
 <!--800082-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800082-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800082-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800082-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800082--></AD_REFERENCE>
 
 <!--800083--><AD_REFERENCE>
@@ -3000,6 +3601,8 @@
 <!--800083-->  <NAME><![CDATA[Argument Type]]></NAME>
 <!--800083-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800083-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800083-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800083-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800083--></AD_REFERENCE>
 
 <!--800084--><AD_REFERENCE>
@@ -3010,6 +3613,8 @@
 <!--800084-->  <NAME><![CDATA[Arguments]]></NAME>
 <!--800084-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800084-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800084-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800084-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800084--></AD_REFERENCE>
 
 <!--800085--><AD_REFERENCE>
@@ -3021,6 +3626,8 @@
 <!--800085-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800085-->  <VFORMAT><![CDATA[LL]]></VFORMAT>
 <!--800085-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800085-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800085-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800085--></AD_REFERENCE>
 
 <!--800086--><AD_REFERENCE>
@@ -3031,6 +3638,8 @@
 <!--800086-->  <NAME><![CDATA[DimensionalFilterPurchase]]></NAME>
 <!--800086-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800086-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800086-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800086-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800086--></AD_REFERENCE>
 
 <!--800087--><AD_REFERENCE>
@@ -3041,6 +3650,8 @@
 <!--800087-->  <NAME><![CDATA[DimensionalFilterSale]]></NAME>
 <!--800087-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800087-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800087-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800087-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800087--></AD_REFERENCE>
 
 <!--800088--><AD_REFERENCE>
@@ -3051,6 +3662,8 @@
 <!--800088-->  <NAME><![CDATA[Cost Uom]]></NAME>
 <!--800088-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800088-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800088-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800088-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800088--></AD_REFERENCE>
 
 <!--800089--><AD_REFERENCE>
@@ -3061,6 +3674,8 @@
 <!--800089-->  <NAME><![CDATA[Cost type]]></NAME>
 <!--800089-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800089-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800089-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800089-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800089--></AD_REFERENCE>
 
 <!--800090--><AD_REFERENCE>
@@ -3071,6 +3686,8 @@
 <!--800090-->  <NAME><![CDATA[C_BP_TaxCategory]]></NAME>
 <!--800090-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800090-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800090-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800090-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800090--></AD_REFERENCE>
 
 <!--800092--><AD_REFERENCE>
@@ -3081,6 +3698,8 @@
 <!--800092-->  <NAME><![CDATA[Locator search]]></NAME>
 <!--800092-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800092-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800092-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800092-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800092--></AD_REFERENCE>
 
 <!--800093--><AD_REFERENCE>
@@ -3091,6 +3710,8 @@
 <!--800093-->  <NAME><![CDATA[Responsible employee]]></NAME>
 <!--800093-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800093-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800093-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800093-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800093--></AD_REFERENCE>
 
 <!--800095--><AD_REFERENCE>
@@ -3101,6 +3722,8 @@
 <!--800095-->  <NAME><![CDATA[Shipment/Receipt]]></NAME>
 <!--800095-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800095-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800095-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800095-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800095--></AD_REFERENCE>
 
 <!--800096--><AD_REFERENCE>
@@ -3111,6 +3734,8 @@
 <!--800096-->  <NAME><![CDATA[Invoice Line]]></NAME>
 <!--800096-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--800096-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800096-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800096-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--800096--></AD_REFERENCE>
 
 <!--800097--><AD_REFERENCE>
@@ -3121,6 +3746,8 @@
 <!--800097-->  <NAME><![CDATA[Class format type]]></NAME>
 <!--800097-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800097-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800097-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800097-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800097--></AD_REFERENCE>
 
 <!--800098--><AD_REFERENCE>
@@ -3131,6 +3758,8 @@
 <!--800098-->  <NAME><![CDATA[In/out transaction types for planning]]></NAME>
 <!--800098-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800098-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800098-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800098-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800098--></AD_REFERENCE>
 
 <!--800099--><AD_REFERENCE>
@@ -3141,6 +3770,8 @@
 <!--800099-->  <NAME><![CDATA[Quantity type]]></NAME>
 <!--800099-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800099-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800099-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800099-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800099--></AD_REFERENCE>
 
 <!--800100--><AD_REFERENCE>
@@ -3151,6 +3782,8 @@
 <!--800100-->  <NAME><![CDATA[MRP_ProductionLine]]></NAME>
 <!--800100-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800100-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800100-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800100-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800100--></AD_REFERENCE>
 
 <!--800101--><AD_REFERENCE>
@@ -3162,6 +3795,10 @@
 <!--800101-->  <DESCRIPTION><![CDATA[Link]]></DESCRIPTION>
 <!--800101-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--800101-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800101-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--800101-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringDomainType]]></MODEL_IMPL>
+<!--800101-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADLink]]></WAD_IMPL>
+<!--800101-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UILink]]></UI_IMPL>
 <!--800101--></AD_REFERENCE>
 
 <!--800102--><AD_REFERENCE>
@@ -3173,6 +3810,8 @@
 <!--800102-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800102-->  <VFORMAT><![CDATA[L]]></VFORMAT>
 <!--800102-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800102-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800102-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800102--></AD_REFERENCE>
 
 <!--800103--><AD_REFERENCE>
@@ -3183,6 +3822,8 @@
 <!--800103-->  <NAME><![CDATA[Development Status]]></NAME>
 <!--800103-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800103-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800103-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800103-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800103--></AD_REFERENCE>
 
 <!--800104--><AD_REFERENCE>
@@ -3193,6 +3834,8 @@
 <!--800104-->  <NAME><![CDATA[Output format]]></NAME>
 <!--800104-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--800104-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800104-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800104-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--800104--></AD_REFERENCE>
 
 <!--800105--><AD_REFERENCE>
@@ -3204,6 +3847,8 @@
 <!--800105-->  <DESCRIPTION><![CDATA[User Role]]></DESCRIPTION>
 <!--800105-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800105-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800105-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800105-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800105--></AD_REFERENCE>
 
 <!--800106--><AD_REFERENCE>
@@ -3214,6 +3859,8 @@
 <!--800106-->  <NAME><![CDATA[AD_Language system]]></NAME>
 <!--800106-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--800106-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--800106-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--800106-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--800106--></AD_REFERENCE>
 
 <!--1000300000--><AD_REFERENCE>
@@ -3226,6 +3873,8 @@
 <!--1000300000-->  <HELP><![CDATA[Type of an Alert Rule. Data driven (check for a valid SQL clause) or External (not check the SQL clause).]]></HELP>
 <!--1000300000-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1000300000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1000300000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1000300000-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1000300000--></AD_REFERENCE>
 
 <!--1000300001--><AD_REFERENCE>
@@ -3236,6 +3885,8 @@
 <!--1000300001-->  <NAME><![CDATA[Number of Employees]]></NAME>
 <!--1000300001-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1000300001-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1000300001-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1000300001-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1000300001--></AD_REFERENCE>
 
 <!--1000300002--><AD_REFERENCE>
@@ -3246,6 +3897,8 @@
 <!--1000300002-->  <NAME><![CDATA[Countries]]></NAME>
 <!--1000300002-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--1000300002-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1000300002-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1000300002-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--1000300002--></AD_REFERENCE>
 
 <!--1000300003--><AD_REFERENCE>
@@ -3256,6 +3909,8 @@
 <!--1000300003-->  <NAME><![CDATA[Type of Business]]></NAME>
 <!--1000300003-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1000300003-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1000300003-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1000300003-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1000300003--></AD_REFERENCE>
 
 <!--1000500000--><AD_REFERENCE>
@@ -3268,6 +3923,8 @@
 <!--1000500000-->  <HELP><![CDATA[ABC classification according to a Pareto distribution]]></HELP>
 <!--1000500000-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1000500000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1000500000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1000500000-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1000500000--></AD_REFERENCE>
 
 <!--1002100000--><AD_REFERENCE>
@@ -3279,6 +3936,8 @@
 <!--1002100000-->  <DESCRIPTION><![CDATA[Report Type General Ledger]]></DESCRIPTION>
 <!--1002100000-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1002100000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1002100000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1002100000-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1002100000--></AD_REFERENCE>
 
 <!--1004400000--><AD_REFERENCE>
@@ -3294,6 +3953,8 @@
 -D: Cancelled]]></HELP>
 <!--1004400000-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1004400000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1004400000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1004400000-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1004400000--></AD_REFERENCE>
 
 <!--1004400001--><AD_REFERENCE>
@@ -3304,6 +3965,8 @@
 <!--1004400001-->  <NAME><![CDATA[Requisition lock cause]]></NAME>
 <!--1004400001-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1004400001-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1004400001-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1004400001-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1004400001--></AD_REFERENCE>
 
 <!--1004400002--><AD_REFERENCE>
@@ -3316,6 +3979,8 @@
 <!--1004400002-->  <HELP><![CDATA[List of available external services]]></HELP>
 <!--1004400002-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1004400002-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1004400002-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1004400002-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1004400002--></AD_REFERENCE>
 
 <!--1005900000--><AD_REFERENCE>
@@ -3326,6 +3991,8 @@
 <!--1005900000-->  <NAME><![CDATA[All_Processed_Status_Expenses]]></NAME>
 <!--1005900000-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1005900000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1005900000-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1005900000-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1005900000--></AD_REFERENCE>
 
 <!--08622CB965B844CFBD2A337BEDB70EFD--><AD_REFERENCE>
@@ -3338,6 +4005,8 @@
 <!--08622CB965B844CFBD2A337BEDB70EFD-->  <HELP><![CDATA[Types of beats: When enabling, disabling the process, a scheduled beat, or unknown (old beats)]]></HELP>
 <!--08622CB965B844CFBD2A337BEDB70EFD-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--08622CB965B844CFBD2A337BEDB70EFD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--08622CB965B844CFBD2A337BEDB70EFD--></AD_REFERENCE>
 
 <!--1722C8B5D1BC4B349332167C3E3A4561--><AD_REFERENCE>
@@ -3348,6 +4017,8 @@
 <!--1722C8B5D1BC4B349332167C3E3A4561-->  <NAME><![CDATA[Database Object Type]]></NAME>
 <!--1722C8B5D1BC4B349332167C3E3A4561-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--1722C8B5D1BC4B349332167C3E3A4561-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1722C8B5D1BC4B349332167C3E3A4561-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1722C8B5D1BC4B349332167C3E3A4561-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--1722C8B5D1BC4B349332167C3E3A4561--></AD_REFERENCE>
 
 <!--21A4E92C455C432FACDC0C45372454F5--><AD_REFERENCE>
@@ -3360,6 +4031,8 @@
 <!--21A4E92C455C432FACDC0C45372454F5-->  <HELP><![CDATA[Convenience for specifying weekend, weekday or specific days.]]></HELP>
 <!--21A4E92C455C432FACDC0C45372454F5-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--21A4E92C455C432FACDC0C45372454F5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--21A4E92C455C432FACDC0C45372454F5-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--21A4E92C455C432FACDC0C45372454F5-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--21A4E92C455C432FACDC0C45372454F5--></AD_REFERENCE>
 
 <!--22F546D49D3A48E1B2B4F50446A8DE58--><AD_REFERENCE>
@@ -3370,6 +4043,8 @@
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <NAME><![CDATA[C_DocType_Trx]]></NAME>
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--22F546D49D3A48E1B2B4F50446A8DE58-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--22F546D49D3A48E1B2B4F50446A8DE58-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--22F546D49D3A48E1B2B4F50446A8DE58-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--22F546D49D3A48E1B2B4F50446A8DE58--></AD_REFERENCE>
 
 <!--2969F07308CB43ECBCDAE151C12F03E0--><AD_REFERENCE>
@@ -3382,6 +4057,8 @@
 <!--2969F07308CB43ECBCDAE151C12F03E0-->  <HELP><![CDATA[All amounts available to be taken as tax base amount for tax calculation.]]></HELP>
 <!--2969F07308CB43ECBCDAE151C12F03E0-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--2969F07308CB43ECBCDAE151C12F03E0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2969F07308CB43ECBCDAE151C12F03E0-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--2969F07308CB43ECBCDAE151C12F03E0-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--2969F07308CB43ECBCDAE151C12F03E0--></AD_REFERENCE>
 
 <!--3F854F4DC7284CE4857A5EA941BE032C--><AD_REFERENCE>
@@ -3394,6 +4071,8 @@
 <!--3F854F4DC7284CE4857A5EA941BE032C-->  <HELP><![CDATA[Defines the type of modules, a module can be a "module" which contains data and sources, a "package" which contains other modules or a "template" which contains other modules and a configuration script.]]></HELP>
 <!--3F854F4DC7284CE4857A5EA941BE032C-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--3F854F4DC7284CE4857A5EA941BE032C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3F854F4DC7284CE4857A5EA941BE032C-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--3F854F4DC7284CE4857A5EA941BE032C-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--3F854F4DC7284CE4857A5EA941BE032C--></AD_REFERENCE>
 
 <!--47209D76F3EE4B6D84222C5BDF170AA2--><AD_REFERENCE>
@@ -3405,6 +4084,8 @@
 <!--47209D76F3EE4B6D84222C5BDF170AA2-->  <DESCRIPTION><![CDATA[Used for search box values yes/no and empty (for any)]]></DESCRIPTION>
 <!--47209D76F3EE4B6D84222C5BDF170AA2-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--47209D76F3EE4B6D84222C5BDF170AA2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--47209D76F3EE4B6D84222C5BDF170AA2-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--47209D76F3EE4B6D84222C5BDF170AA2-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--47209D76F3EE4B6D84222C5BDF170AA2--></AD_REFERENCE>
 
 <!--4AA6C3BE9D3B4D84A3B80489505A23E5--><AD_REFERENCE>
@@ -3417,6 +4098,10 @@
 <!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <HELP><![CDATA[Contains a link to a BLOB image in AD_Image table, this reference replaces the old Image reference]]></HELP>
 <!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <VALIDATIONTYPE><![CDATA[D]]></VALIDATIONTYPE>
 <!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <ISBASEREFERENCE><![CDATA[Y]]></ISBASEREFERENCE>
+<!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.SearchDomainType]]></MODEL_IMPL>
+<!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <WAD_IMPL><![CDATA[org.openbravo.wad.controls.WADImageBLOB]]></WAD_IMPL>
+<!--4AA6C3BE9D3B4D84A3B80489505A23E5-->  <UI_IMPL><![CDATA[org.openbravo.reference.ui.UIImageBLOB]]></UI_IMPL>
 <!--4AA6C3BE9D3B4D84A3B80489505A23E5--></AD_REFERENCE>
 
 <!--55BB57CFEF7E4EA0B3F429E4A55586D8--><AD_REFERENCE>
@@ -3427,6 +4112,8 @@
 <!--55BB57CFEF7E4EA0B3F429E4A55586D8-->  <NAME><![CDATA[AD_Process UIPattern]]></NAME>
 <!--55BB57CFEF7E4EA0B3F429E4A55586D8-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--55BB57CFEF7E4EA0B3F429E4A55586D8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--55BB57CFEF7E4EA0B3F429E4A55586D8-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--55BB57CFEF7E4EA0B3F429E4A55586D8-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--55BB57CFEF7E4EA0B3F429E4A55586D8--></AD_REFERENCE>
 
 <!--5AD08D5DF85549E0BCC0DEBDE4C0D340--><AD_REFERENCE>
@@ -3439,6 +4126,8 @@
 <!--5AD08D5DF85549E0BCC0DEBDE4C0D340-->  <HELP><![CDATA[Permits to define different types of Attribute Set Values, depending on their usage.]]></HELP>
 <!--5AD08D5DF85549E0BCC0DEBDE4C0D340-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--5AD08D5DF85549E0BCC0DEBDE4C0D340-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5AD08D5DF85549E0BCC0DEBDE4C0D340-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--5AD08D5DF85549E0BCC0DEBDE4C0D340-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--5AD08D5DF85549E0BCC0DEBDE4C0D340--></AD_REFERENCE>
 
 <!--5BBEA02A7BCE441A81BC546DF034162E--><AD_REFERENCE>
@@ -3449,6 +4138,8 @@
 <!--5BBEA02A7BCE441A81BC546DF034162E-->  <NAME><![CDATA[All document tax amount calculation criteria]]></NAME>
 <!--5BBEA02A7BCE441A81BC546DF034162E-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--5BBEA02A7BCE441A81BC546DF034162E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5BBEA02A7BCE441A81BC546DF034162E-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--5BBEA02A7BCE441A81BC546DF034162E-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--5BBEA02A7BCE441A81BC546DF034162E--></AD_REFERENCE>
 
 <!--5D4B2983E0254AA1B60A82A7B92DB67D--><AD_REFERENCE>
@@ -3461,6 +4152,8 @@
 <!--5D4B2983E0254AA1B60A82A7B92DB67D-->  <HELP><![CDATA[Includes a list of all the possible license to distribute modules.]]></HELP>
 <!--5D4B2983E0254AA1B60A82A7B92DB67D-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--5D4B2983E0254AA1B60A82A7B92DB67D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5D4B2983E0254AA1B60A82A7B92DB67D-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--5D4B2983E0254AA1B60A82A7B92DB67D-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--5D4B2983E0254AA1B60A82A7B92DB67D--></AD_REFERENCE>
 
 <!--60E231391A7348DDA7171E780F62EF99--><AD_REFERENCE>
@@ -3473,6 +4166,8 @@
 <!--60E231391A7348DDA7171E780F62EF99-->  <HELP><![CDATA[Determines which is the purpose for an Openbravo ERP instance]]></HELP>
 <!--60E231391A7348DDA7171E780F62EF99-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--60E231391A7348DDA7171E780F62EF99-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--60E231391A7348DDA7171E780F62EF99-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--60E231391A7348DDA7171E780F62EF99-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--60E231391A7348DDA7171E780F62EF99--></AD_REFERENCE>
 
 <!--65447418FD4D428CA025AC9AF26ADA21--><AD_REFERENCE>
@@ -3484,6 +4179,8 @@
 <!--65447418FD4D428CA025AC9AF26ADA21-->  <DESCRIPTION><![CDATA[Periods for the selected year]]></DESCRIPTION>
 <!--65447418FD4D428CA025AC9AF26ADA21-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--65447418FD4D428CA025AC9AF26ADA21-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--65447418FD4D428CA025AC9AF26ADA21-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--65447418FD4D428CA025AC9AF26ADA21-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--65447418FD4D428CA025AC9AF26ADA21--></AD_REFERENCE>
 
 <!--665CE68BB382425BB43057256767B5DE--><AD_REFERENCE>
@@ -3495,6 +4192,8 @@
 <!--665CE68BB382425BB43057256767B5DE-->  <DESCRIPTION><![CDATA[Frequency by which a Process trigger is executed.]]></DESCRIPTION>
 <!--665CE68BB382425BB43057256767B5DE-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--665CE68BB382425BB43057256767B5DE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--665CE68BB382425BB43057256767B5DE-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--665CE68BB382425BB43057256767B5DE-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--665CE68BB382425BB43057256767B5DE--></AD_REFERENCE>
 
 <!--6C11958E975D4DF8A38E7F4A119A3077--><AD_REFERENCE>
@@ -3506,6 +4205,8 @@
 <!--6C11958E975D4DF8A38E7F4A119A3077-->  <DESCRIPTION><![CDATA[The first, second, third, fourth specified day in a month.]]></DESCRIPTION>
 <!--6C11958E975D4DF8A38E7F4A119A3077-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--6C11958E975D4DF8A38E7F4A119A3077-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6C11958E975D4DF8A38E7F4A119A3077-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--6C11958E975D4DF8A38E7F4A119A3077-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--6C11958E975D4DF8A38E7F4A119A3077--></AD_REFERENCE>
 
 <!--7039147A5B49457DA3D13F807EC8E01F--><AD_REFERENCE>
@@ -3517,6 +4218,8 @@
 <!--7039147A5B49457DA3D13F807EC8E01F-->  <DESCRIPTION><![CDATA[How  a Process trigger will finish]]></DESCRIPTION>
 <!--7039147A5B49457DA3D13F807EC8E01F-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--7039147A5B49457DA3D13F807EC8E01F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7039147A5B49457DA3D13F807EC8E01F-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--7039147A5B49457DA3D13F807EC8E01F-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--7039147A5B49457DA3D13F807EC8E01F--></AD_REFERENCE>
 
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4--><AD_REFERENCE>
@@ -3529,6 +4232,8 @@
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <HELP><![CDATA[Status for modules]]></HELP>
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4--></AD_REFERENCE>
 
 <!--7CD9193198B94EF5B174D0F8512B0857--><AD_REFERENCE>
@@ -3540,6 +4245,8 @@
 <!--7CD9193198B94EF5B174D0F8512B0857-->  <DESCRIPTION><![CDATA[List of action for loggin modules]]></DESCRIPTION>
 <!--7CD9193198B94EF5B174D0F8512B0857-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--7CD9193198B94EF5B174D0F8512B0857-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7CD9193198B94EF5B174D0F8512B0857-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--7CD9193198B94EF5B174D0F8512B0857-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--7CD9193198B94EF5B174D0F8512B0857--></AD_REFERENCE>
 
 <!--7DB6D4792CDC4ED297C70A4F4282A52E--><AD_REFERENCE>
@@ -3552,6 +4259,8 @@
 <!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <HELP><![CDATA[The status a process - Scheduled, Processing, Error, Success.]]></HELP>
 <!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--7DB6D4792CDC4ED297C70A4F4282A52E-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--7DB6D4792CDC4ED297C70A4F4282A52E--></AD_REFERENCE>
 
 <!--865D46B9A1C148D1A119F2F0F7F55589--><AD_REFERENCE>
@@ -3563,6 +4272,9 @@
 <!--865D46B9A1C148D1A119F2F0F7F55589-->  <DESCRIPTION><![CDATA[The status of the system (the last executed phase of the rebuild process)]]></DESCRIPTION>
 <!--865D46B9A1C148D1A119F2F0F7F55589-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--865D46B9A1C148D1A119F2F0F7F55589-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--865D46B9A1C148D1A119F2F0F7F55589-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--865D46B9A1C148D1A119F2F0F7F55589-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--865D46B9A1C148D1A119F2F0F7F55589-->  <MODEL_IMPL><![CDATA[org.openbravo.base.model.domaintype.StringEnumerateDomainType]]></MODEL_IMPL>
 <!--865D46B9A1C148D1A119F2F0F7F55589--></AD_REFERENCE>
 
 <!--A85EA9A581DB42DCA5576FAFCD08A1B7--><AD_REFERENCE>
@@ -3574,6 +4286,8 @@
 <!--A85EA9A581DB42DCA5576FAFCD08A1B7-->  <DESCRIPTION><![CDATA[Account Element Value]]></DESCRIPTION>
 <!--A85EA9A581DB42DCA5576FAFCD08A1B7-->  <VALIDATIONTYPE><![CDATA[S]]></VALIDATIONTYPE>
 <!--A85EA9A581DB42DCA5576FAFCD08A1B7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A85EA9A581DB42DCA5576FAFCD08A1B7-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--A85EA9A581DB42DCA5576FAFCD08A1B7-->  <PARENTREFERENCE_ID><![CDATA[30]]></PARENTREFERENCE_ID>
 <!--A85EA9A581DB42DCA5576FAFCD08A1B7--></AD_REFERENCE>
 
 <!--ABD8815EDEDB412C820FB94532952721--><AD_REFERENCE>
@@ -3586,6 +4300,8 @@
 <!--ABD8815EDEDB412C820FB94532952721-->  <HELP><![CDATA[Timing option used to schedule a process.]]></HELP>
 <!--ABD8815EDEDB412C820FB94532952721-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--ABD8815EDEDB412C820FB94532952721-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--ABD8815EDEDB412C820FB94532952721-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--ABD8815EDEDB412C820FB94532952721-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--ABD8815EDEDB412C820FB94532952721--></AD_REFERENCE>
 
 <!--AD93286C917A4A74BE5898FD0158100A--><AD_REFERENCE>
@@ -3597,6 +4313,8 @@
 <!--AD93286C917A4A74BE5898FD0158100A-->  <DESCRIPTION><![CDATA[Heartbeat status]]></DESCRIPTION>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--AD93286C917A4A74BE5898FD0158100A-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--AD93286C917A4A74BE5898FD0158100A-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--AD93286C917A4A74BE5898FD0158100A--></AD_REFERENCE>
 
 <!--D15C950D445D408E8CC8135E530C246B--><AD_REFERENCE>
@@ -3609,6 +4327,8 @@
 <!--D15C950D445D408E8CC8135E530C246B-->  <HELP><![CDATA[Tab UI Pattern defines the UI pattern the tab will implement]]></HELP>
 <!--D15C950D445D408E8CC8135E530C246B-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--D15C950D445D408E8CC8135E530C246B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D15C950D445D408E8CC8135E530C246B-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--D15C950D445D408E8CC8135E530C246B-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--D15C950D445D408E8CC8135E530C246B--></AD_REFERENCE>
 
 <!--DE78D015D6AD4F9E8DB9A120C6227FF7--><AD_REFERENCE>
@@ -3621,6 +4341,8 @@
 <!--DE78D015D6AD4F9E8DB9A120C6227FF7-->  <HELP><![CDATA[Modules]]></HELP>
 <!--DE78D015D6AD4F9E8DB9A120C6227FF7-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--DE78D015D6AD4F9E8DB9A120C6227FF7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--DE78D015D6AD4F9E8DB9A120C6227FF7-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--DE78D015D6AD4F9E8DB9A120C6227FF7-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--DE78D015D6AD4F9E8DB9A120C6227FF7--></AD_REFERENCE>
 
 <!--DF7938526F074F33A9C8A7ED74EA315A--><AD_REFERENCE>
@@ -3631,6 +4353,8 @@
 <!--DF7938526F074F33A9C8A7ED74EA315A-->  <NAME><![CDATA[Model Object Type]]></NAME>
 <!--DF7938526F074F33A9C8A7ED74EA315A-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--DF7938526F074F33A9C8A7ED74EA315A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--DF7938526F074F33A9C8A7ED74EA315A-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--DF7938526F074F33A9C8A7ED74EA315A-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--DF7938526F074F33A9C8A7ED74EA315A--></AD_REFERENCE>
 
 <!--F19E4A390AAB4A02B3D3CC944F091598--><AD_REFERENCE>
@@ -3643,6 +4367,8 @@
 <!--F19E4A390AAB4A02B3D3CC944F091598-->  <HELP><![CDATA[Type of license for OPS]]></HELP>
 <!--F19E4A390AAB4A02B3D3CC944F091598-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--F19E4A390AAB4A02B3D3CC944F091598-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F19E4A390AAB4A02B3D3CC944F091598-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--F19E4A390AAB4A02B3D3CC944F091598-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--F19E4A390AAB4A02B3D3CC944F091598--></AD_REFERENCE>
 
 <!--F3455CBD6B69470396BE1FF35EC8CEDA--><AD_REFERENCE>
@@ -3654,6 +4380,8 @@
 <!--F3455CBD6B69470396BE1FF35EC8CEDA-->  <DESCRIPTION><![CDATA[Tax selection]]></DESCRIPTION>
 <!--F3455CBD6B69470396BE1FF35EC8CEDA-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--F3455CBD6B69470396BE1FF35EC8CEDA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F3455CBD6B69470396BE1FF35EC8CEDA-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--F3455CBD6B69470396BE1FF35EC8CEDA-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--F3455CBD6B69470396BE1FF35EC8CEDA--></AD_REFERENCE>
 
 <!--F4175D3FED5949AAAA9C04A281E60866--><AD_REFERENCE>
@@ -3664,6 +4392,8 @@
 <!--F4175D3FED5949AAAA9C04A281E60866-->  <NAME><![CDATA[AD_Column date column]]></NAME>
 <!--F4175D3FED5949AAAA9C04A281E60866-->  <VALIDATIONTYPE><![CDATA[T]]></VALIDATIONTYPE>
 <!--F4175D3FED5949AAAA9C04A281E60866-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F4175D3FED5949AAAA9C04A281E60866-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--F4175D3FED5949AAAA9C04A281E60866-->  <PARENTREFERENCE_ID><![CDATA[18]]></PARENTREFERENCE_ID>
 <!--F4175D3FED5949AAAA9C04A281E60866--></AD_REFERENCE>
 
 <!--F909D710BC084C92BC740A4FD498C99D--><AD_REFERENCE>
@@ -3676,6 +4406,8 @@
 <!--F909D710BC084C92BC740A4FD498C99D-->  <HELP><![CDATA[Type of general accounting report]]></HELP>
 <!--F909D710BC084C92BC740A4FD498C99D-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--F909D710BC084C92BC740A4FD498C99D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F909D710BC084C92BC740A4FD498C99D-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--F909D710BC084C92BC740A4FD498C99D-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
 <!--F909D710BC084C92BC740A4FD498C99D--></AD_REFERENCE>
 
 </data>
--- a/src-db/database/sourcedata/AD_REF_TABLE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_REF_TABLE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -9,7 +9,7 @@
 <!--1-->  <AD_KEY><![CDATA[129]]></AD_KEY>
 <!--1-->  <AD_DISPLAY><![CDATA[130]]></AD_DISPLAY>
 <!--1-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
-<!--1-->  <WHERECLAUSE><![CDATA[AD_Reference.ValidationType='D']]></WHERECLAUSE>
+<!--1-->  <WHERECLAUSE><![CDATA[AD_Reference.IsBaseReference='Y']]></WHERECLAUSE>
 <!--1-->  <ORDERBYCLAUSE><![CDATA[2]]></ORDERBYCLAUSE>
 <!--1--></AD_REF_TABLE>
 
@@ -34,8 +34,8 @@
 <!--4-->  <AD_KEY><![CDATA[129]]></AD_KEY>
 <!--4-->  <AD_DISPLAY><![CDATA[130]]></AD_DISPLAY>
 <!--4-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
-<!--4-->  <WHERECLAUSE><![CDATA[AD_Reference.ValidationType in ('T','L','S')]]></WHERECLAUSE>
-<!--4-->  <ORDERBYCLAUSE><![CDATA[AD_Reference.ValidationType, 2]]></ORDERBYCLAUSE>
+<!--4-->  <WHERECLAUSE><![CDATA[AD_Reference.IsBaseReference = 'N']]></WHERECLAUSE>
+<!--4-->  <ORDERBYCLAUSE><![CDATA[AD_Reference.ParentReference_ID, 2]]></ORDERBYCLAUSE>
 <!--4--></AD_REF_TABLE>
 
 <!--100--><AD_REF_TABLE>
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -77,10 +77,10 @@
 <!--115-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--115-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--115-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--115-->  <NAME><![CDATA[AD_Reference List or Table]]></NAME>
-<!--115-->  <DESCRIPTION><![CDATA[List or Table validation choices]]></DESCRIPTION>
+<!--115-->  <NAME><![CDATA[AD_Reference Subreference]]></NAME>
+<!--115-->  <DESCRIPTION><![CDATA[Subreference validation choices]]></DESCRIPTION>
 <!--115-->  <TYPE><![CDATA[S]]></TYPE>
-<!--115-->  <CODE><![CDATA[AD_Reference.ValidationType=(CASE @AD_Reference_ID@ WHEN '17' THEN 'L' WHEN '25' THEN 'L' WHEN '30' THEN 'S' WHEN '28' THEN 'L' ELSE 'T' END)]]></CODE>
+<!--115-->  <CODE><![CDATA[AD_Reference.ParentReference_ID=@AD_Reference_ID@]]></CODE>
 <!--115-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--115--></AD_VAL_RULE>
 
--- a/src-test/org/openbravo/test/dal/IssuesTest.java	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-test/org/openbravo/test/dal/IssuesTest.java	Thu Feb 11 12:10:47 2010 +0100
@@ -125,7 +125,7 @@
   public void test11461() {
     setSystemAdministratorContext();
 
-    Module module = OBDal.getInstance().createCriteria(Module.class).list().get(0);
+    Module module = OBDal.getInstance().get(Module.class, "0");
     module.setInDevelopment(true);
     OBDal.getInstance().save(module);
     OBDal.getInstance().flush();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/dal/PerformanceGenerateInstanceTest.java	Thu Feb 11 12:10:47 2010 +0100
@@ -0,0 +1,68 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2010 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.test.dal;
+
+import org.openbravo.dal.core.DalUtil;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.system.Client;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.geography.Location;
+import org.openbravo.test.base.BaseTest;
+
+/**
+ * Generates many {@link Location} objects to use for testing performance.
+ * 
+ * @author mtaal
+ */
+
+public class PerformanceGenerateInstanceTest extends BaseTest {
+
+  private static final int START = 1001;
+  private static final long NUMBER = 1000000;
+  private static final long COMMIT_COUNT = NUMBER / 10;
+
+  public void testLocationInstanceCreation() {
+    setBigBazaarAdminContext();
+    final Location location = OBDal.getInstance().get(Location.class, "1000000");
+    long time = System.currentTimeMillis();
+    Client zeroClient = OBDal.getInstance().get(Client.class, "0");
+    Organization zeroOrg = OBDal.getInstance().get(Organization.class, "0");
+    for (int i = START; i < NUMBER; i++) {
+      final Location copy = (Location) DalUtil.copy(location);
+      copy.setId(null);
+      copy.setNewOBObject(true);
+      copy.setCityName("CITY " + i);
+      copy.setRegionName("REGION " + i);
+      copy.setPostalAdd("PA" + i);
+      copy.setPostalCode("PC" + i);
+      copy.setClient(zeroClient);
+      copy.setOrganization(zeroOrg);
+      OBDal.getInstance().save(copy);
+      if ((i % COMMIT_COUNT) == 0) {
+        OBDal.getInstance().commitAndClose();
+        System.err.println(i + ", commit and flush, time " + (System.currentTimeMillis() - time));
+        time = System.currentTimeMillis();
+        zeroClient = OBDal.getInstance().get(Client.class, "0");
+        zeroOrg = OBDal.getInstance().get(Organization.class, "0");
+      }
+    }
+  }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/dal/SimpleDalReadTest.java	Thu Feb 11 12:10:47 2010 +0100
@@ -0,0 +1,47 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SL 
+ * All portions are Copyright (C) 2010 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.test.dal;
+
+import org.apache.log4j.Logger;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.model.common.businesspartner.Category;
+import org.openbravo.test.base.BaseTest;
+
+/**
+ * Contains one simple test case to test reading of in-memory model and a simple query action.
+ * 
+ * @author mtaal
+ */
+
+public class SimpleDalReadTest extends BaseTest {
+  private static final Logger log = Logger.getLogger(SimpleDalReadTest.class);
+
+  /**
+   * Read a couple of BPCategories.
+   */
+  public void testDoRead() {
+    setSystemAdministratorContext();
+    final OBQuery<Category> obQuery = OBDal.getInstance().createQuery(Category.class, "");
+    for (Category category : obQuery.list()) {
+      log.debug(category.getIdentifier());
+    }
+  }
+}
\ No newline at end of file
--- a/src-wad/build.xml	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/build.xml	Thu Feb 11 12:10:47 2010 +0100
@@ -13,7 +13,7 @@
  * and  limitations under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2005-2008 Openbravo SL 
+ * All portions are Copyright (C) 2005-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s): Openbravo S.L.
  ************************************************************************
@@ -35,6 +35,7 @@
   <property name="build.wad.docs" value="${basedir}/docs" />
   <property name="build.wad.sqlc" value="${basedir}/build/javasqlc" />
   <property name="build.wad.src" value="${basedir}/src" />
+  <property name="main.dir" value="${basedir}/.." />
 
   <path id="wad.class.path">
     <pathelement path="../src-core/build/classes" />
@@ -61,22 +62,35 @@
       <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.wad.sqlc}'" />
       <classpath refid="wad.class.path" />
     </java>
+  	
+  	<java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.wad.sqlc}'/src */src-wad" />
+  	  <classpath refid="wad.class.path" />
+  	</java>
   </target>
 
   <target name="compileSqlc" depends="sqlc">
-    <javac srcdir="${build.wad.sqlc}/src" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${build.wad.sqlc}/src" includes="**/*.java" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="wad.class.path" />
     </javac>
   </target>
 
   <target name="compile" depends="compileSqlc">
-    <javac srcdir="${build.wad.src}" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
+    <javac srcdir="${main.dir}" includes="src-wad/src/**/*.java,modules/*/src-wad/**/*.java" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
       <classpath refid="wad.class.path" />
     </javac>
     <copy todir="${build.wad}" encoding="UTF-8">
       <fileset dir="${build.wad.src}" includes="**/*xml" />
       <fileset dir="${build.wad.src}" includes="**/*html" />
     </copy>
+    <copy todir="${build.wad}" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+          <include name="*/src-wad/**/*" />
+          <exclude name="*/src-wad/**/*.java" />
+          <exclude name="*/src-wad/**/*.xsql" />
+      </fileset>
+      <mapper type="regexp" from="(.*\${file.separator}src-wad)(.*)" to="\2" />
+    </copy>
   </target>
 
   <target name="build.jar">
--- a/src-wad/src/org/openbravo/wad/EditionFields_data.xsql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/EditionFields_data.xsql	Thu Feb 11 12:10:47 2010 +0100
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -20,7 +20,7 @@
 
 
 
-<SqlClass name="EditionFieldsData" package="org.openbravo.wad">
+<SqlClass name="EditionFieldsData" package="org.openbravo.wad" accessModifier="public">
   <SqlMethod name="select" type="preparedStatement" return="multiple">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql><![CDATA[
@@ -32,7 +32,8 @@
       ad_column.ad_process_id, ad_field.isreadonly, to_char(ad_field.DISPLAYLOGIC) as displaylogic, ad_field.isEncrypted, AD_FIELD.AD_FIELDGROUP_ID AS FieldGroup, ad_field.ad_tab_id as tabid, '' as ad_column_id, ad_column.ad_val_rule_id, '' as displaylength, '' as value, '' as ad_window_id, 
       AD_COLUMN.ValueMin, AD_COLUMN.ValueMax, REPLACE(REPLACE(REPLACE(REPLACE(ad_column.columnname, 'Substitute', 'M_Product'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM', ''), 'M_LocatorTo_ID', 'M_Locator_ID') as realName, mom.mappingname as java_class_name, '' as realcolumnname, '' as xsqltext, ad_column.isEncrypted AS isColumnEncrypted, ad_column.isDesencryptable, 
       ad_reference.name as reference_name, ad_reference.name as reference_name_trl, '' AS CLASSNAME, '' AS MAPPINGNAME, ad_callout.name as calloutname, 
-      moc.classname as classname_callout, momc.mappingname as mappingname_callout, '' AS COLUMNNAME_END, ad_field.isactive, ad_column.readonlylogic 
+      moc.classname as classname_callout, momc.mappingname as mappingname_callout, '' AS COLUMNNAME_END, ad_field.isactive, ad_column.readonlylogic, 
+      ad_column.ad_reference_id, ad_column.ad_reference_value_id
       FROM ad_column left join ad_element on ad_column.ad_element_id = ad_element.ad_element_id
                      left join ad_process on ad_column.ad_process_id = ad_process.ad_process_id
                      left join ad_reference on ad_column.ad_reference_id = ad_reference.ad_reference_id
@@ -67,7 +68,7 @@
                    else 'Y'
                end), 'Y', 'N', 'N', c.FIELDLENGTH, c.name, null, 
              null, 'Y', '@ShowAudit@=''Y''', 'N', '1000100001' as fieldgroup, tb.ad_tab_id, null, null, null, null, null, null, null, c.columnname, 
-             null, null, null, 'N', 'N', r.name, r.name, null, null, null, null, null, null, 'Y', null
+             null, null, null, 'N', 'N', r.name, r.name, null, null, null, null, null, null, 'Y', null, c.ad_reference_id, c.ad_reference_value_id
        from ad_column c, ad_tab tb, ad_reference r
       where c.ad_table_id = tb.ad_table_id
         and upper(columnname) in ('CREATED', 'CREATEDBY', 'UPDATED', 'UPDATEDBY')
@@ -167,33 +168,6 @@
     <Parameter name="tab"/>
   </SqlMethod>
 
-  <SqlMethod name="selectionColumns" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
-    <Sql>
-      SELECT ad_column.ColumnName As columnName, ad_column.ColumnName As columnNameInp, 
-      ad_field.name as Name, ismandatory as required, ad_reference_value_id as referenceValue, 
-      ad_column.ad_reference_id as reference, displayLength as displaySize, 'x' as htmltext, 
-      isSameLine as issameline, isDisplayed as isdisplayed, isupdateable as isupdateable, 
-      isparent, ad_column.FIELDLENGTH, ad_element.name as searchName, ad_column.ad_callout_id, 
-      ad_column.ad_process_id, ad_field.isreadonly, ad_field.DISPLAYLOGIC, ad_field.ad_tab_id as tabid, 
-      ad_callout.name as calloutname, moc.classname as classname_callout, momc.mappingname as mappingname_callout
-      FROM ad_field, 
-           ad_column left join ad_element on ad_column.ad_element_id = ad_element.ad_element_id
-           left join ad_callout on ad_column.ad_callout_id = ad_callout.ad_callout_id 
-           left join ad_model_object moc on ad_callout.ad_callout_id = moc.ad_callout_id 
-                              AND moc.action = 'C' 
-                              AND moc.isactive = 'Y'
-                              AND moc.isdefault = 'Y' 
-           left join ad_model_object_mapping momc on moc.ad_model_object_id = momc.ad_model_object_id 
-                              AND momc.isactive = 'Y' 
-                              AND momc.isdefault = 'Y'
-      WHERE ad_field.ad_column_id = ad_column.ad_column_id 
-        AND ad_field.ad_tab_id = ?
-        AND upper(ad_column.columnname) in ('VALUE', 'NAME', 'DESCRIPTION')
-      ORDER BY ad_field.SEQNO
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
   <SqlMethod name="fieldGroupName" type="preparedStatement" return="String" default="">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
@@ -254,13 +228,14 @@
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql><![CDATA[
       SELECT R.NAME, T.TABLENAME AS REFERENCE, C.COLUMNNAME AS COLUMNNAME, RSC.NAME AS COLUMNNAMEINP, 
-      RSC.COLUMNNAME AS REFERENCEVALUE, MO.CLASSNAME, MOM.MAPPINGNAME, RSC.COLUMN_SUFFIX AS COLUMNNAME_END 
+      RSC.COLUMNNAME AS REFERENCEVALUE, MO.CLASSNAME, MOM.MAPPINGNAME, RSC.COLUMN_SUFFIX AS COLUMNNAME_END,
+      c.ad_column_id
       FROM AD_REFERENCE R left join AD_REF_SEARCH RS  on R.AD_REFERENCE_ID = RS.AD_REFERENCE_ID 
                           left join AD_REF_SEARCH_COLUMN RSC on RS.AD_REF_SEARCH_ID = RSC.AD_REF_SEARCH_ID
                                 AND RSC.COLUMNTYPE = ?, 
            AD_MODEL_OBJECT MO, AD_MODEL_OBJECT_MAPPING MOM, 
            AD_TABLE T, AD_COLUMN C 
-      WHERE R.VALIDATIONTYPE = 'S' 
+      WHERE R.parentreference_id = '30' 
       AND R.AD_REFERENCE_ID = ?
       AND R.AD_REFERENCE_ID = MO.AD_REFERENCE_ID
       AND MO.ACTION = 'S' 
--- a/src-wad/src/org/openbravo/wad/Fields_data.xsql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/Fields_data.xsql	Thu Feb 11 12:10:47 2010 +0100
@@ -20,7 +20,7 @@
 
 
 
-<SqlClass name="FieldsData" package="org.openbravo.wad">
+<SqlClass name="FieldsData" package="org.openbravo.wad" accessModifier="public">
   <SqlMethod name="select" type="preparedStatement" return="multiple">
     <SqlMethodComment>Names of the columns of the fields of a tab</SqlMethodComment>
     <Sql>
@@ -68,23 +68,7 @@
     </Sql>
     <Parameter name="tab"/>
   </SqlMethod>
-  <SqlMethod name="selectDescriptionTrl" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Description of the fields of a tab</SqlMethodComment>
-    <Sql>
-      SELECT (CASE WHEN ft.Name IS NULL THEN '*' || f.Name ELSE ft.Name END) As Name, f.isDisplayed as isdisplayed, f.isEncrypted, c.AD_REFERENCE_ID as reference, 
-      c.FIELDLENGTH, 'Medio' as Text_Align, f.displaylength, c.ColumnName, f.showInRelation 
-      FROM ad_field f left join ad_field_trl ft on f.ad_field_id = ft.ad_field_id 
-                                              AND ft.isactive = 'Y'
-                                              AND ft.ad_language = ?, 
-           ad_column c 
-      WHERE f.ad_column_id = c.ad_column_id 
-      AND f.showInRelation = 'Y' 
-      AND f.ad_tab_id = ?    
-      ORDER BY f.SEQNO
-    </Sql>
-    <Parameter name="adLanguage"/>
-    <Parameter name="tab"/>    
-  </SqlMethod>
+  
   <SqlMethod name="selectAuxiliar" type="preparedStatement" return="multiple">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
@@ -96,22 +80,7 @@
     <Parameter name="sql" optional="true" after="WHERE " text="code LIKE ? || '%' AND "/>
     <Parameter name="tab"/>
   </SqlMethod>
-  <SqlMethod name="tabName" type="preparedStatement" return="string">
-    <SqlMethodComment>Name of the tab</SqlMethodComment>
-    <Sql>
-        SELECT Name FROM ad_tab
-        WHERE ad_tab_id = ?
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
-  <SqlMethod name="windowName" type="preparedStatement" return="string">
-      <SqlMethodComment>Name of the window</SqlMethodComment>
-      <Sql>
-        SELECT ad_window.Name FROM ad_tab, ad_window
-        WHERE ad_window.ad_window_id = ad_tab.ad_window_id and ad_tab_id = ?
-      </Sql>
-      <Parameter name="tab"/>
-  </SqlMethod>
+  
   <SqlMethod name="tableKeyColumnName" type="preparedStatement" return="multiple">
       <SqlMethodComment>Name of the column key of the tab</SqlMethodComment>
       <Sql><![CDATA[
@@ -203,23 +172,7 @@
       <Parameter name="parentTab"/>
       <Parameter name="parentTab"/>
   </SqlMethod>
-  <SqlMethod name="parentsColumnRealAll" type="preparedStatement" return="multiple">
-      <SqlMethodComment>Name of the columns parent of the tab</SqlMethodComment>
-      <Sql>
-        SELECT ColumnName AS NAME, AD_REFERENCE_id AS reference, ad_reference_value_id AS referencevalue,
-        (SELECT tableNAME FROM AD_TABLE, AD_TAB WHERE AD_TABLE.ad_table_id = AD_TAB.ad_table_id
-        AND AD_TAB.ad_tab_id=?) AS tablename,
-        (SELECT P.ad_module_id FROM AD_TABLE T, AD_PACKAGE P WHERE T.ad_table_id = AD_COLUMN.ad_table_id AND T.AD_PACKAGE_ID = P.AD_PACKAGE_ID) as tableModule,
-        AD_COLUMN.AD_Module_ID as columnModule
-        FROM AD_FIELD, AD_COLUMN 
-        WHERE AD_FIELD.ad_column_id = AD_COLUMN.ad_column_id 
-        AND ad_tab_id = ? 
-        AND isparent='Y'
-        order by ad_column.seqno
-      </Sql>
-      <Parameter name="parentTab"/>
-      <Parameter name="tab"/>
-  </SqlMethod>
+
   <SqlMethod name="parentsColumnDisplayNameSortTab" type="preparedStatement" return="multiple">
       <SqlMethodComment>Name of the columns parent of the tab</SqlMethodComment>
       <Sql><![CDATA[
@@ -267,21 +220,7 @@
       <Parameter name="tab"/>
       <Parameter name="parentTab"/>
   </SqlMethod>
-  <SqlMethod name="parentsColumnDisplayNameRealAll" type="preparedStatement" return="multiple">
-      <SqlMethodComment>Name of the columns parent of the tab</SqlMethodComment>
-      <Sql>
-        SELECT ad_field.Name AS NAME, AD_FIELD_TRL.NAME AS COLUMNNAME
-        FROM AD_FIELD left join AD_FIELD_TRL on AD_FIELD.AD_FIELD_ID = AD_FIELD_TRL.AD_FIELD_ID 
-                                            AND AD_FIELD_TRL.AD_LANGUAGE = ? ,
-             AD_COLUMN 
-        WHERE AD_FIELD.ad_column_id = AD_COLUMN.ad_column_id 
-        AND ad_tab_id = ?
-        AND isparent='Y'
-        ORDER BY AD_Column.SEQNO
-      </Sql>
-      <Parameter name="adLanguage"/>
-      <Parameter name="tab"/>
-  </SqlMethod>
+ 
   <SqlMethod name="tableName" type="preparedStatement" return="string">
       <SqlMethodComment>Name of the table of the tab</SqlMethodComment>
       <Sql>
@@ -306,52 +245,7 @@
     ]]></Sql>
     <Parameter name="tab"/>
   </SqlMethod>
-  <SqlMethod name="selectLists" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Fields of reference list in a tab</SqlMethodComment>
-    <Sql>
-      SELECT ColumnName As Name, 'x' as xmltext, ad_reference_value_id as referencevalue, ColumnName as NameRef, ad_table.tablename 
-      FROM ad_field, ad_column, ad_table
-      WHERE ad_field.ad_column_id = ad_column.ad_column_id 
-        and ad_column.ad_table_id = ad_table.ad_table_id 
-        and ad_field.ISDISPLAYED = 'Y'
-        AND ad_tab_id = ?
-        AND ad_reference_id = '17'
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
-  <SqlMethod name="selectTables" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Fields of reference table in a tab</SqlMethodComment>
-    <Sql>
-      SELECT ColumnName As Name, 'x' as xmltext, ad_reference_value_id as referencevalue, 
-      ad_val_rule.CODE as defaultValue, ad_val_rule.AD_VAL_RULE_ID as columnname,
-      ad_ref_table.WHERECLAUSE, ad_table.tablename, ad_table.name as nameref, 'TableList' as tablenametrl, 
-      '18' as reference, 'Y' as required, ad_column.istranslated 
-      FROM ad_field, ad_column left join ad_val_rule on ad_column.AD_VAL_RULE_ID = ad_val_rule.AD_VAL_RULE_ID , 
-          ad_ref_table, ad_table 
-      WHERE ad_field.ad_column_id = ad_column.ad_column_id 
-      AND ad_ref_table.ad_table_id = ad_table.ad_table_id 
-      AND ad_column.AD_REFERENCE_VALUE_ID = ad_ref_table.AD_REFERENCE_ID  
-      and ad_field.ISDISPLAYED = 'Y'
-      AND ad_tab_id = ? 
-      AND ad_column.ad_reference_id = '18'
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
-  <SqlMethod name="selectTableDirs" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Fields of reference table in a tab</SqlMethodComment>
-    <Sql>
-      SELECT ColumnName As Name, 'x' as xmltext, ColumnName as referencevalue, 
-      ad_val_rule.CODE as defaultValue, ad_val_rule.AD_VAL_RULE_ID as columnname, ad_table.tablename, 
-      'TableDir' as tablenametrl, '' as WHERECLAUSE, '19' as reference, ad_column.istranslated 
-      FROM ad_field, ad_column left join ad_val_rule on ad_column.AD_VAL_RULE_ID = ad_val_rule.AD_VAL_RULE_ID , ad_table 
-      WHERE ad_field.ad_column_id = ad_column.ad_column_id 
-      and ad_column.ad_table_id = ad_table.ad_table_id 
-      and ad_field.ISDISPLAYED = 'Y'
-      AND ad_tab_id = ? 
-      AND ad_reference_id = '19'
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
+  
   <SqlMethod name="columnIdentifier" type="preparedStatement" return="string">
       <SqlMethodComment>Name of the table of the tab</SqlMethodComment>
       <Sql>
@@ -374,7 +268,7 @@
       <Sql>
         SELECT ad_column.columnname as name, ad_reference_id as reference, ismandatory as required, 
         REPLACE(replace(REPLACE(REPLACE(AD_ELEMENT.columnname, 'Substitute_ID', 'M_Product_ID'), 'C_Settlement_Cancel_ID', 'C_Settlement_ID'), 'BOM_ID', '_ID'), 'M_LocatorTo_ID', 'M_Locator_ID') as columnname, ad_reference_value_id as referencevalue, 
-        ad_column.istranslated, ad_table.tablename 
+        ad_column.istranslated, ad_table.tablename, ad_reference_value_id
         FROM ad_column left join ad_element on ad_column.ad_element_id = ad_element.ad_element_id, 
              ad_table 
         WHERE UPPER(ad_table.tablename) = UPPER(?)
@@ -421,7 +315,7 @@
       ad_table.TABLENAME as NameRef, ad_reference_value_id as type, ad_column.name as realname
       FROM ad_field, ad_column, ad_table
       WHERE ad_field.ad_column_id = ad_column.ad_column_id
-	  	AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
+        AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
         AND ad_tab_id = ? 
         AND upper(ad_column.columnname) <> 'BINARYDATA'
       union
@@ -473,7 +367,7 @@
       ad_table.TABLENAME as NameRef, '' as realname
       FROM ad_field, ad_column, ad_table
       WHERE ad_field.ad_column_id = ad_column.ad_column_id
-	  	AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
+        AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
         AND ad_tab_id = ? 
         and isParent='N'
         and ad_column.columnname = 'DocumentNo'
@@ -749,7 +643,7 @@
       ad_table.TABLENAME as NameRef, '' as realname, ad_column.ISSESSIONATTR, ad_column.istranslated 
       FROM ad_field, ad_column, ad_table
       WHERE ad_field.ad_column_id = ad_column.ad_column_id
-	  	AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
+        AND ad_column.AD_TABLE_ID = ad_table.AD_TABLE_ID 
         AND ad_tab_id = ? 
         and ismandatory='Y' 
         AND upper(ad_column.columnname) = 'VALUE'
@@ -833,23 +727,7 @@
     </Sql>
     <Parameter name="tab"/>
   </SqlMethod>
-  <SqlMethod name="hasButtonList" type="preparedStatement" return="String" default="0">
-    <SqlMethodComment>Checks if the tab has action buttons</SqlMethodComment>
-    <Sql>
-      <![CDATA[
-          select count(*) as total
-        from ad_field f,
-             ad_column c
-       where f.ad_tab_id = ?
-         and f.ad_column_id = c.ad_column_id
-         and ad_reference_id = '28'
-         and ad_reference_value_id is not null
-         and f.isdisplayed = 'Y'
-         and f.isactive='Y'
-      ]]>
-    </Sql>
-    <Parameter name="tab"/>
-  </SqlMethod>
+
   <SqlMethod name="hasButtonFixed" type="preparedStatement" return="String" default="0">
     <SqlMethodComment>Checks if the tab has action buttons</SqlMethodComment>
     <Sql>
--- a/src-wad/src/org/openbravo/wad/TableLink_data.xsql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/TableLink_data.xsql	Thu Feb 11 12:10:47 2010 +0100
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -58,15 +58,16 @@
     </Sql>
     <Parameter name="adTableId"/>
   </SqlMethod>
+  
   <SqlMethod name="tableId" type="preparedStatement" return="String" default="">
-    <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
       SELECT AD_TABLE_ID 
-      FROM AD_REF_TABLE 
-      WHERE AD_REFERENCE_ID = ?
+      FROM AD_COLUMN
+      WHERE AD_COLUMN_ID = ?
     </Sql>
-    <Parameter name="adReferenceId"/>
+    <Parameter name="adColumnId"/>
   </SqlMethod>
+  
   <SqlMethod name="tableNameId" type="preparedStatement" return="String" default="">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
@@ -77,29 +78,17 @@
     </Sql>
     <Parameter name="tablename"/>
   </SqlMethod>
+  
   <SqlMethod name="columnName" type="preparedStatement" return="String" default="">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
       SELECT C.COLUMNNAME 
-      FROM AD_REF_TABLE R, AD_COLUMN C 
-      WHERE R.AD_KEY = C.AD_COLUMN_ID 
-      AND R.AD_REFERENCE_ID = ? 
+      FROM AD_COLUMN C 
+      WHERE C.AD_COLUMN_ID = ? 
     </Sql>
-    <Parameter name="adReferenceId"/>
+    <Parameter name="adColumnId"/>
   </SqlMethod>
-  <SqlMethod name="keyColumnName" type="preparedStatement" return="String" default="">
-    <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
-    <Sql>
-      SELECT C.COLUMNNAME 
-      FROM AD_TABLE T, AD_COLUMN C 
-      WHERE T.AD_TABLE_ID = C.AD_TABLE_ID 
-      AND (C.ISKEY = 'Y'
-      OR C.ISSECONDARYKEY='Y')
-      AND UPPER(T.TABLENAME) = UPPER(?) 
-      ORDER BY SEQNO
-    </Sql>
-    <Parameter name="tablename"/>
-  </SqlMethod>
+  
   <SqlMethod name="hasTree" type="preparedStatement" return="String" default="">
     <SqlMethodComment>Names of the columns and name of the fields of a tab</SqlMethodComment>
     <Sql>
--- a/src-wad/src/org/openbravo/wad/TableRelation_data.xsql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/TableRelation_data.xsql	Thu Feb 11 12:10:47 2010 +0100
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -20,7 +20,7 @@
 
 
 
-<SqlClass name="TableRelationData" package="org.openbravo.wad">
+<SqlClass name="TableRelationData" package="org.openbravo.wad" accessModifier="public">
   <SqlMethod name="select" type="preparedStatement" return="multiple">
     <SqlMethodComment>The table references in dictionary</SqlMethodComment>
     <Sql>
@@ -55,31 +55,6 @@
     <Parameter name="reference"/>
   </SqlMethod>
 
-  <SqlMethod name="selectValidation" type="preparedStatement" return="multiple">
-    <SqlMethodComment>The table references in dictionary</SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        select distinct rt.ad_reference_id as referenceId, v.AD_VAL_RULE_ID, 
-        t.name as tableName, c1.columnname as keyName, 
-        c2.columnname as displayName, rt.isvaluedisplayed,
-        rt.whereclause, rt.orderbyclause, '' as clause,
-        v.CODE, '' as parameters, t.name as fromclause, 
-        c2.columnname as name, c2.ad_reference_id as reference, 'Y' as required, c2.AD_REFERENCE_VALUE_ID as referenceValue, 
-        c2.istranslated 
-        from ad_column c, ad_table t, ad_val_rule v, ad_reference r, ad_reference r2,
-        ad_ref_table rt, ad_column c1, ad_column c2
-        where c.AD_VAL_RULE_ID = v.AD_VAL_RULE_ID
-        and c.AD_REFERENCE_ID = r.AD_REFERENCE_ID
-        and c.AD_REFERENCE_VALUE_ID = r2.AD_REFERENCE_ID
-        and c.AD_VAL_RULE_ID is not null
-        and r2.AD_REFERENCE_ID = rt.AD_REFERENCE_ID
-        and rt.AD_TABLE_ID = t.AD_TABLE_ID
-        AND rt.ad_key = c1.ad_column_id
-        AND rt.ad_display = c2.ad_column_id
-      ]]>
-    </Sql>
-  </SqlMethod>
-
   <SqlMethod name="existsTableColumn" type="preparedStatement" return="Boolean" default="false">
     <SqlMethodComment>The table references in dictionary</SqlMethodComment>
     <Sql>
--- a/src-wad/src/org/openbravo/wad/Wad.java	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/Wad.java	Thu Feb 11 12:10:47 2010 +0100
@@ -75,7 +75,6 @@
   static final int IMAGE_RELATION_HEIGHT = 16;
   static final int IMAGE_BUTTON_WIDTH = 16;
   static final int IMAGE_BUTTON_HEIGHT = 16;
-  static final String IMAGE_DEFAULT = "blank.gif";
   XmlEngine xmlEngine;
   protected WadConnection pool;
   String strSystemSeparator;
@@ -1138,142 +1137,12 @@
     final Vector<Object> vecSelCol = new Vector<Object>(0);
     if (selCol != null) {
       for (int i = 0; i < selCol.length; i++) {
+
         selCol[i].htmltext = "strParam" + selCol[i].columnname + ".equals(\"\")";
         selCol[i].columnnameinp = FormatUtilities.replace(selCol[i].columnname);
-
-        if (WadUtility.isGeneralNumber(selCol[i].reference)
-            || WadUtility.isDecimalNumber(selCol[i].reference)
-            || WadUtility.isPriceNumber(selCol[i].reference)
-            || WadUtility.isIntegerNumber(selCol[i].reference)
-            || WadUtility.isQtyNumber(selCol[i].reference)
-            || WadUtility.isDateField(selCol[i].reference)
-            || WadUtility.isTimeField(selCol[i].reference)
-            || WadUtility.isDateTimeField(selCol[i].reference)) {
-          final EditionFieldsData aux = new EditionFieldsData();
-          aux.adColumnId = selCol[i].adColumnId;
-          aux.name = selCol[i].name;
-          aux.reference = selCol[i].reference;
-          aux.referencevalue = selCol[i].referencevalue;
-          aux.adValRuleId = selCol[i].adValRuleId;
-          aux.fieldlength = selCol[i].fieldlength;
-          aux.displaylength = selCol[i].displaylength;
-          aux.columnname = selCol[i].columnname + "_f";
-          aux.realcolumnname = selCol[i].realcolumnname;
-          aux.columnnameinp = selCol[i].columnnameinp;
-          aux.value = selCol[i].value;
-          aux.adWindowId = selCol[i].adWindowId;
-          aux.htmltext = "strParam" + aux.columnname + ".equals(\"\")";
-          selCol[i].xmltext = " + ((strParam" + selCol[i].columnname + ".equals(\"\") || strParam"
-              + selCol[i].columnname + ".equals(\"%\"))?\"\":\" AND ";
-          if (WadUtility.isTimeField(selCol[i].reference)) {
-            selCol[i].xmltext += "TO_CHAR(" + tableName + "." + selCol[i].realcolumnname
-                + ", 'HH24:MI:SS') >= ";
-            selCol[i].xsqltext = "TO_CHAR(" + tableName + "." + selCol[i].realcolumnname
-                + ", 'HH24:MI:SS') >= ";
-          } else {
-            selCol[i].xmltext += "(" + tableName + "." + selCol[i].realcolumnname + ") >= ";
-            selCol[i].xsqltext = tableName + "." + selCol[i].realcolumnname + " >= ";
-          }
-          if (WadUtility.isDateField(selCol[i].reference)
-              || WadUtility.isTimeField(selCol[i].reference)
-              || WadUtility.isDateTimeField(selCol[i].reference)) {
-            selCol[i].xmltext += "TO_TIMESTAMP('";
-            selCol[i].xsqltext += "TO_TIMESTAMP";
-          }
-          selCol[i].xmltext += "\" + strParam" + selCol[i].columnname + " + \"";
-          if (WadUtility.isTimeField(selCol[i].reference))
-            selCol[i].xmltext += "', 'HH24:MI:SS')";
-          else if (WadUtility.isDateField(selCol[i].reference)
-              || WadUtility.isDateTimeField(selCol[i].reference))
-            selCol[i].xmltext += "')";
-          selCol[i].xmltext += " \")";
-          selCol[i].xsqltext += "(?"
-              + (WadUtility.isTimeField(selCol[i].reference) ? ", 'HH24:MI:SS'" : "") + ") ";
-          aux.columnnameinp = FormatUtilities.replace(selCol[i].columnname) + "_f";
-          aux.xmltext = " + ((strParam" + aux.columnname + ".equals(\"\") || strParam"
-              + aux.columnname + ".equals(\"%\"))?\"\":\" AND";
-          if (WadUtility.isTimeField(selCol[i].reference)) {
-            aux.xmltext += "TO_CHAR(" + tableName + "." + aux.realcolumnname + ", 'HH24:MI:SS') < ";
-            aux.xsqltext = "TO_CHAR(" + tableName + "." + aux.realcolumnname + ", 'HH24:MI:SS') < ";
-          } else {
-            aux.xmltext += "(" + tableName + "." + aux.realcolumnname + ") < ";
-            aux.xsqltext = tableName + "." + aux.realcolumnname + " < ";
-          }
-
-          if (WadUtility.isDateField(selCol[i].reference)
-              || WadUtility.isTimeField(selCol[i].reference)
-              || WadUtility.isDateTimeField(selCol[i].reference)) {
-            aux.xmltext += "TO_TIMESTAMP('";
-            aux.xsqltext += "TO_TIMESTAMP";
-          } else if (WadUtility.isGeneralNumber(selCol[i].reference)
-              || WadUtility.isDecimalNumber(selCol[i].reference)
-              || WadUtility.isPriceNumber(selCol[i].reference)
-              || WadUtility.isIntegerNumber(selCol[i].reference)
-              || WadUtility.isQtyNumber(selCol[i].reference) || selCol[i].reference.equals("13")) {
-            aux.xmltext += "TO_NUMBER('";
-            aux.xsqltext += "TO_NUMBER";
-          }
-          aux.xmltext += "\" + strParam" + aux.columnname + " + \"";
-          if (WadUtility.isTimeField(selCol[i].reference))
-            aux.xmltext += "', 'HH24:MI:SS')";
-          else if (WadUtility.isDateField(selCol[i].reference)
-              || WadUtility.isDateTimeField(selCol[i].reference))
-            aux.xmltext += "')";
-          else if (WadUtility.isGeneralNumber(selCol[i].reference)
-              || WadUtility.isDecimalNumber(selCol[i].reference)
-              || WadUtility.isPriceNumber(selCol[i].reference)
-              || WadUtility.isIntegerNumber(selCol[i].reference)
-              || WadUtility.isQtyNumber(selCol[i].reference) || selCol[i].reference.equals("13"))
-            aux.xmltext += "')";
-          aux.xmltext += " + 1 \")";
-          aux.xsqltext += "(?"
-              + (WadUtility.isTimeField(selCol[i].reference) ? ", 'HH24:MI:SS'" : "") + ") + 1 ";
-          vecAuxSelCol.addElement(aux);
-        } else {
-          selCol[i].xmltext = " + ((strParam" + selCol[i].columnname + ".equals(\"\") || strParam"
-              + selCol[i].columnname + ".equals(\"%\"))?\"\":\" AND ";
-          if (WadUtility.isLikeType(selCol[i].reference)
-              && !WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xmltext += "C_IGNORE_ACCENT";
-          }
-          selCol[i].xmltext += "(" + tableName + "." + selCol[i].realcolumnname + ")";
-          if (WadUtility.isLikeType(selCol[i].reference)
-              && !WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xmltext += " LIKE C_IGNORE_ACCENT('";
-          } else if (WadUtility.isLikeType(selCol[i].reference)
-              && WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xmltext += " LIKE ('";
-          } else {
-            selCol[i].xmltext += " = (";
-            if (WadUtility.isTextData(selCol[i].reference)
-                || WadUtility.isLikeType(selCol[i].reference))
-              selCol[i].xmltext += "'";
-          }
-          selCol[i].xmltext += "\" + strParam" + selCol[i].columnname + " + \"";
-          if (WadUtility.isLikeType(selCol[i].reference)) {
-            selCol[i].xmltext += "'";
-          } else if (WadUtility.isTextData(selCol[i].reference)) {
-            selCol[i].xmltext += "'";
-          }
-          selCol[i].xmltext += ") \")";
-          selCol[i].xsqltext = "";
-          if (WadUtility.isLikeType(selCol[i].reference)
-              && !WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xsqltext = "C_IGNORE_ACCENT";
-          }
-          selCol[i].xsqltext += "(" + tableName + "." + selCol[i].realcolumnname + ")";
-          if (WadUtility.isLikeType(selCol[i].reference)
-              && !WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xsqltext += " LIKE C_IGNORE_ACCENT";
-          } else if (WadUtility.isLikeType(selCol[i].reference)
-              && WadUtility.isSearchValueColumn(selCol[i].realcolumnname)) {
-            selCol[i].xsqltext += " LIKE ";
-          } else {
-            selCol[i].xsqltext += " = ";
-          }
-          selCol[i].xsqltext += "(?)";
-          // selCol[i].xsqltext += " AND ";
-        }
+        WADControl control = WadUtility.getWadControlClass(pool, selCol[i].reference,
+            selCol[i].referencevalue);
+        control.processSelCol(tableName, selCol[i], vecAuxSelCol);
 
         vecSelCol.addElement(selCol[i]);
       }
@@ -1325,7 +1194,6 @@
     final int itable = 0;
     final Vector<Object> vecCounters = new Vector<Object>();
     final Vector<Object> vecOrderAux = new Vector<Object>();
-    String strOrder = "";
     vecCounters.addElement(Integer.toString(itable));
     vecCounters.addElement(Integer.toString(ilist));
     FieldsData[] fieldsData = null;
@@ -1335,7 +1203,9 @@
           && !fieldsData[i].columnname.equalsIgnoreCase("CreatedBy")
           && !fieldsData[i].columnname.equalsIgnoreCase("Updated")
           && !fieldsData[i].columnname.equalsIgnoreCase("UpdatedBy")) {
-        if (WadUtility.isTimeField(fieldsData[i].reference)) {
+
+        // hardcoded these special cases
+        if (fieldsData[i].reference.equals("24")) {
           vecFields.addElement("TO_CHAR(" + tableName + "." + fieldsData[i].name
               + ", 'HH24:MI:SS') AS " + fieldsData[i].name);
         } else if (fieldsData[i].reference.equals("20")) {
@@ -1349,165 +1219,10 @@
           vecFields.addElement(tableName + "." + fieldsData[i].name);
         }
 
-        if (fieldsData[i].reference.equals("19") && // TableDir
-            fieldsData[i].isdisplayed.equals("Y")) {
-          final Vector<Object> vecSubFields = new Vector<Object>();
-          WadUtility.columnIdentifier(pool, tableName, fieldsData[i].required.equals("Y"),
-              fieldsData[i], vecCounters, false, vecSubFields, vecTables, vecWhere, vecParameters,
-              vecTableParameters, sqlDateFormat);
-          log4j.debug("Identifier of: " + fieldsData[i].name);
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" (");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecSubFields.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields.append(" || ' - ' || ");
-            }
-            strFields.append("COALESCE(TO_CHAR(").append(tableField).append("),'') ");
-          }
-          strOrder = strFields.toString() + ")";
-          vecFields.addElement("(CASE WHEN " + tableName + "." + fieldsData[i].name
-              + " IS NULL THEN '' ELSE " + strFields.toString() + ") END) AS " + fieldsData[i].name
-              + "R");
-        } else if (fieldsData[i].reference.equals("17") && fieldsData[i].isdisplayed.equals("Y")) { // List
-          final Vector<Object> vecSubFields = new Vector<Object>();
-          WadUtility.columnIdentifier(pool, tableName, fieldsData[i].required.equals("Y"),
-              fieldsData[i], vecCounters, false, vecSubFields, vecTables, vecWhere, vecParameters,
-              vecTableParameters, sqlDateFormat);
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" ( ");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecSubFields.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields.append(" || ' - ' || ");
-            }
-            strFields.append("COALESCE(TO_CHAR(").append(tableField).append("),'') ");
-          }
-          strOrder = strFields.toString() + ")";
-          vecFields.addElement("(CASE WHEN " + tableName + "." + fieldsData[i].name
-              + " IS NULL THEN '' ELSE " + strFields.toString() + ") END) AS " + fieldsData[i].name
-              + "R");
-        } else if (fieldsData[i].reference.equals("18") && fieldsData[i].isdisplayed.equals("Y")) { // Table
-          final Vector<Object> vecSubFields = new Vector<Object>();
-          WadUtility.columnIdentifier(pool, tableName, fieldsData[i].required.equals("Y"),
-              fieldsData[i], vecCounters, false, vecSubFields, vecTables, vecWhere, vecParameters,
-              vecTableParameters, sqlDateFormat);
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" ( ");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecSubFields.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields.append(" || ' - ' || ");
-            }
-            strFields.append("COALESCE(TO_CHAR(").append(tableField).append("),'') ");
-          }
-          strOrder = strFields.toString() + ")";
-          vecFields.addElement("(CASE WHEN " + tableName + "." + fieldsData[i].name
-              + " IS NULL THEN '' ELSE " + strFields.toString() + ") END) AS " + fieldsData[i].name
-              + "R");
-        } else if (fieldsData[i].reference.equals("32") && fieldsData[i].isdisplayed.equals("Y")) {
-          final Vector<Object> vecSubFields = new Vector<Object>();
-          WadUtility.columnIdentifier(pool, tableName, fieldsData[i].required.equals("Y"),
-              fieldsData[i], vecCounters, false, vecSubFields, vecTables, vecWhere, vecParameters,
-              vecTableParameters, sqlDateFormat);
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" ( ");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecSubFields.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields.append(" || ' - ' || ");
-            }
-            strFields.append("COALESCE(TO_CHAR(").append(tableField).append("),'') ");
-          }
-          strOrder = strFields.toString() + ")";
-          vecFields.addElement("(CASE WHEN " + tableName + "." + fieldsData[i].name
-              + " IS NULL THEN '" + IMAGE_DEFAULT + "' ELSE " + strFields.toString() + ") END) AS "
-              + fieldsData[i].name + "R");
-        } else if ((fieldsData[i].reference.equals("30") || fieldsData[i].reference.equals("31")
-            || fieldsData[i].reference.equals("35") || fieldsData[i].reference.equals("25") || fieldsData[i].reference
-            .equals("800011"))
-            && fieldsData[i].isdisplayed.equals("Y")) { // Searchs
-          final Vector<Object> vecSubFields = new Vector<Object>();
-          WadUtility.columnIdentifier(pool, tableName, fieldsData[i].required.equals("Y"),
-              fieldsData[i], vecCounters, false, vecSubFields, vecTables, vecWhere, vecParameters,
-              vecTableParameters, sqlDateFormat);
-          log4j.debug("Identifier of: " + fieldsData[i].name);
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" (");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecSubFields.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields.append(" || ' - ' || ");
-            }
-            strFields.append("COALESCE(TO_CHAR(").append(tableField).append("),'') ");
-          }
-          strOrder = strFields.toString() + ")";
-          vecFields.addElement("(CASE WHEN " + tableName + "." + fieldsData[i].name
-              + " IS NULL THEN '' ELSE " + strFields.toString() + ") END) AS " + fieldsData[i].name
-              + "R");
-        } else if (fieldsData[i].reference.equals("21") && fieldsData[i].isdisplayed.equals("Y")) { // Location
-          final StringBuffer strFields = new StringBuffer();
-          strFields.append(" (CASE WHEN " + tableName + "." + fieldsData[i].columnname
-              + " IS NULL THEN '' ELSE TO_CHAR(C_Location_Identifier(" + tableName + "."
-              + fieldsData[i].columnname + ")) END)");
-          log4j.debug("Location field: " + strFields.toString());
-          strOrder = strFields.toString();
-          strFields.append(" AS " + fieldsData[i].name + "R");
-          vecFields.addElement(strFields.toString());
-        } else if (fieldsData[i].reference.equals("28") && fieldsData[i].isdisplayed.equals("Y")
-            && !fieldsData[i].referencevalue.equals("")
-            && !fieldsData[i].name.equalsIgnoreCase("ChangeProjectStatus")) { // Button
-          ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
-          ilist++;
-          vecFields.addElement("list" + ilist + ".name as " + fieldsData[i].name + "_BTN");
-          strOrder = "list" + ilist + ".name";
-          final StringBuffer strWhere = new StringBuffer();
-          if (fieldsData[i].name.equalsIgnoreCase("DocAction")) {
-            strWhere.append(" AND (CASE " + tableName + "." + fieldsData[i].name
-                + " WHEN '--' THEN 'CL' ELSE TO_CHAR(" + tableName + "." + fieldsData[i].name
-                + ") END) = " + "list" + ilist + ".value");
-          } else {
-            strWhere.append(" AND " + tableName + "." + fieldsData[i].name + " = TO_CHAR(list"
-                + ilist + ".value)");
-          }
-          vecTables.addElement("left join ad_ref_list_v list" + ilist + " on (" + "list" + ilist
-              + ".ad_reference_id = '" + fieldsData[i].referencevalue + "' and list" + ilist
-              + ".ad_language = ? " + strWhere.toString() + ")");
-          vecTableParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-          vecCounters.set(1, Integer.toString(ilist));
-        } else {
-          strOrder = tableName + "." + fieldsData[i].name;
-        }
-        if (!fieldsData[i].reference.equals("23") && !fieldsData[i].reference.equals("14")
-            && !fieldsData[i].reference.equals("34") && !fieldsData[i].reference.equals("13")
-            && !fieldsData[i].reference.equals("26") && !fieldsData[i].reference.equals("32")
-            && !fieldsData[i].sortno.equals("")) {
-          final String[] aux = {
-              new String(fieldsData[i].name),
-              new String(strOrder
-                  + (fieldsData[i].name.equalsIgnoreCase("DocumentNo") ? " DESC" : "")) };
-          vecOrderAux.addElement(aux);
-        }
+        WADControl control = WadUtility.getWadControlClass(pool, fieldsData[i].reference,
+            fieldsData[i].referencevalue);
+        control.processTable(strTab, vecFields, vecTables, vecWhere, vecOrderAux, vecParameters,
+            tableName, vecTableParameters, fieldsData[i], vecFieldParameters, vecCounters);
       }
     }
     final FieldsData sfd1[] = FieldsData.selectSequence(pool, strTab);
@@ -2052,47 +1767,7 @@
     xmlDocument.setParameter("searchName", strHighVolume);
     xmlDocument.setParameter("searchVariables", strParamHighVolume);
     xmlDocument.setParameter("searchComparations", strHighVolumeComp);
-    {
-      final StringBuffer fieldsRelationStructure = new StringBuffer();
-      FieldsData[] fieldsDataSelect = null;
-      fieldsDataSelect = copyarray(fieldsDataSelectAux);
-      fieldsRelationStructure
-          .append("strData.append(\"\\\"\").append(Replace.replace(Replace.replace(Replace.replace(data[contadorData].");
-      fieldsRelationStructure.append(Sqlc.TransformaNombreColumna(keyColumnName));
-      fieldsRelationStructure
-          .append(", \"\\r\", \"\"), \"\\n\", \"<br>\"), \"\\\"\", \"\\\\\\\"\")).append(\"\\\"\");\n");
-      for (int i = 0; i < fieldsDataSelect.length; i++) {
-        if (fieldsDataSelect[i].showinrelation.equals("Y")
-            && fieldsDataSelect[i].isencrypted.equals("N")
-            && (fieldsDataSelect[i].isdisplayed.equals("Y"))) {
-          if (parentsFieldsData.length == 0
-              || !parentsFieldsData[0].name.equals(fieldsDataSelect[i].name)) {
-            fieldsRelationStructure.append("strData.append(\",\");\n");
-            fieldsRelationStructure
-                .append("strData.append(\"\\\"\").append(Replace.replace(Replace.replace(Replace.replace(data[contadorData].");
-            if ((fieldsDataSelect[i].reference.equals("17")
-                || fieldsDataSelect[i].reference.equals("18") || fieldsDataSelect[i].reference
-                .equals("19"))
-                && fieldsDataSelect[i].isdisplayed.equals("Y")) { // List
-              fieldsDataSelect[i].name = fieldsDataSelect[i].name + "R"; // _REF
-            } else if ((fieldsDataSelect[i].reference.equals("30")
-                || fieldsDataSelect[i].reference.equals("800011")
-                || fieldsDataSelect[i].reference.equals("31")
-                || fieldsDataSelect[i].reference.equals("35")
-                || fieldsDataSelect[i].reference.equals("25")
-                || fieldsDataSelect[i].reference.equals("21") || fieldsDataSelect[i].reference
-                .equals("32"))
-                && fieldsDataSelect[i].isdisplayed.equals("Y")) {
-              fieldsDataSelect[i].name = fieldsDataSelect[i].name + "R";
-            }
-            fieldsRelationStructure.append(Sqlc.TransformaNombreColumna(fieldsDataSelect[i].name));
-            fieldsRelationStructure
-                .append(", \"\\r\", \"\"), \"\\n\", \"<br>\"), \"\\\"\", \"\\\\\\\"\")).append(\"\\\"\");\n");
-          }
-        }
-      }
-      xmlDocument.setParameter("fieldsRelation", fieldsRelationStructure.toString());
-    }
+
     if (WadUtility.findField(vecFields, "adClientId"))
       xmlDocument.setParameter("clientId", "data.adClientId");
     else
@@ -2122,7 +1797,6 @@
           .size() > 0) ? ", vars.getLanguage()" : "");
     }
     FieldsData[] fieldsData = null;
-    final Vector<Object> vector = new Vector<Object>();
     boolean defaultValue;
     {
       final Vector<Object> vecFieldsSelect = new Vector<Object>();
@@ -2136,16 +1810,10 @@
           fieldsData1[i].name = Sqlc.TransformaNombreColumna(fieldsData1[i].name);
           fieldsData1[i].columnname = fieldsData1[i].name;
           defaultValue = false;
-          if (!fieldsData1[i].reference.equals("23")
-              && !WadUtility.isDateTimeField(fieldsData1[i].reference)
-              && !fieldsData1[i].reference.equals("20")
-              && !WadUtility.isDecimalNumber(fieldsData1[i].reference)
-              && !WadUtility.isQtyNumber(fieldsData1[i].reference)
-              && !WadUtility.isPriceNumber(fieldsData1[i].reference)
-              && !WadUtility.isIntegerNumber(fieldsData1[i].reference)
-              && !WadUtility.isGeneralNumber(fieldsData1[i].reference)
-              && WadUtility.columnRelationFormat(fieldsData1[i], false, MAX_COL_SIZE_RELATION))
-            vector.addElement(fieldsData1[i]);
+
+          WADControl control = WadUtility.getWadControlClass(pool, fieldsData1[i].reference,
+              fieldsData1[i].adReferenceValueId);
+
           if (fieldsData1[i].reference.equals("20")) {
             fieldsData1[i].xmltext = ", \"N\"";
             defaultValue = true;
@@ -2157,7 +1825,7 @@
             fieldsData1[i].xmltext = ", windowId + \"|" + fieldsData1[i].realname + "\"";
             fieldsData1[i].type = "RequestGlobalVariable";
           } else if (fieldsData1[i].issessionattr.equals("Y")) {
-            if (WadActionButton.isNumericType(fieldsData1[i].reference)) {
+            if (control.isNumericType()) {
               fieldsData1[i].xmltext = ", vars.getSessionValue(windowId + \"|"
                   + fieldsData1[i].realname + "\")";
             } else {
@@ -2182,7 +1850,7 @@
             fieldsData1[i].type = "RequiredStringParameter";
           }
 
-          if (WadActionButton.isNumericType(fieldsData1[i].reference)) {
+          if (control.isNumericType()) {
             if (fieldsData1[i].required.equals("Y")) {
               fieldsData1[i].type = "RequiredNumericParameter";
             } else {
@@ -2190,7 +1858,7 @@
             }
           }
 
-          if (WadActionButton.isNumericType(fieldsData1[i].reference)) {
+          if (control.isNumericType()) {
             fieldsData1[i].trytext = " try { ";
             fieldsData1[i].catchtext = " } catch (ServletException paramEx) { ex = paramEx; } ";
           } else {
@@ -2208,9 +1876,7 @@
             fieldsData1[i].htmltexttrl = ")";
           }
           vecFieldsSelect.addElement(fieldsData1[i]);
-          if ((WadUtility.isSearchType(fieldsData1[i].reference) || WadUtility
-              .isSelectType(fieldsData1[i].reference))
-              && fieldsData1[i].isdisplayed.equals("Y")) {
+          if (control.has2UIFields() && fieldsData1[i].isdisplayed.equals("Y")) {
             FieldsData fieldsData2 = null;
             fieldsData2 = copyarrayElement(fieldsData1[i]);
             fieldsData2.name += "r";// (WadUtility.isSearchType(fieldsData1[i].reference)?"D":"r");
@@ -2225,9 +1891,6 @@
       vecFieldsSelect.copyInto(fieldsData);
     }
 
-    final FieldsData[] fieldsTruncate = new FieldsData[vector.size()];
-    vector.copyInto(fieldsTruncate);
-
     // Campos del Session actual
     // Fields of the current Session
     final FieldsData[] fieldsSession = FieldsData.selectSession(pool, strTab);
@@ -2367,7 +2030,7 @@
     }
 
     xmlDocument.setData("structure1", fieldsData);
-    xmlDocument.setData("structure2", fieldsTruncate);
+
     xmlDocument.setData("structure7", auxiliarFields);
     xmlDocument.setData("structure27", auxiliarFields);
     xmlDocument.setData("structure8", fieldsParentSession);
@@ -2453,10 +2116,10 @@
         } else if (sfd[i].accesslevel.equals("6")
             && sfd[i].columnname.equalsIgnoreCase("AD_ORG_ID")) {
           sfd[i].defaultvalue = "\"0\"";
-        } else if (!sfd[i].referencevalue.equals("13")) {
+        } else if (!sfd[i].referencevalue.equals("13")) { // ID
           sfd[i].defaultvalue = "Utility.getDefault(this, vars, \"" + sfd[i].columnname + "\", \""
               + WadUtility.toJavaString(sfd[i].defaultvalue) + "\", \"" + strWindow + "\", \""
-              + WadUtility.getWadDefaultValue(sfd[i]) + "\", dataField)";
+              + WadUtility.getWadDefaultValue(pool, sfd[i]) + "\", dataField)";
         } else {
           sfd[i].defaultvalue = "\"\"";
         }
@@ -2466,25 +2129,8 @@
       } else {
         sfd[i].defaultvalue = "strP" + sfd[i].columnname;
       }
-      if ((sfd[i].referencevalue.equals("30") || sfd[i].referencevalue.equals("31")
-          || sfd[i].referencevalue.equals("35") || sfd[i].referencevalue.equals("25") || sfd[i].reference
-          .equals("800011"))
-          && sfd[i].isdisplayed.equals("Y"))
-        strDefaultValues.append(", " + tabName + "Data.selectDef" + sfd[i].reference + "_"
-            + (isSelect++) + "(this, " + sfd[i].defaultvalue + ")");
-      else if (sfd[i].referencevalue.equals("28") && sfd[i].isdisplayed.equals("Y")
-          && !sfd[i].type.equals(""))
-        strDefaultValues.append(
-            ", (vars.getLanguage().equals(\"en_US\")?ListData.selectName(this, \"").append(
-            sfd[i].type).append("\", ").append(sfd[i].defaultvalue).append(
-            "):ListData.selectNameTrl(this, vars.getLanguage(), \"").append(sfd[i].type).append(
-            "\", ").append(sfd[i].defaultvalue).append("))");
-      else if (sfd[i].referencevalue.equals("21") && sfd[i].isdisplayed.equals("Y"))
-        strDefaultValues.append(", LocationSearchData.locationAddress(this, " + sfd[i].defaultvalue
-            + ")");
-      else if (sfd[i].referencevalue.equals("32") && sfd[i].isdisplayed.equals("Y"))
-        strDefaultValues.append(", " + tabName + "Data.selectDef" + sfd[i].reference + "_"
-            + (isSelect++) + "(this, " + sfd[i].defaultvalue + ")");
+      WADControl control = WadUtility.getWadControlClass(pool, sfd[i].referencevalue, sfd[i].type);
+      isSelect = control.addAdditionDefaulJavaFields(strDefaultValues, sfd[i], tabName, isSelect);
     }
 
     final StringBuffer controlsJavaSource = new StringBuffer();
@@ -3001,113 +2647,19 @@
           fieldsDef[i].whereclause = parametros.toString();
           v.addElement(fieldsDef[i]);
         }
-        if ((fieldsDef[i].referencevalue.equals("30") || fieldsDef[i].referencevalue.equals("31")
-            || fieldsDef[i].referencevalue.equals("35") || fieldsDef[i].reference.equals("800011") || fieldsDef[i].referencevalue
-            .equals("25"))
-            && fieldsDef[i].isdisplayed.equals("Y")) {
-          final FieldsData fd = new FieldsData();
-          fd.reference = fieldsDef[i].reference + "_" + (itable++);
-          fd.name = fieldsDef[i].columnname + "R";
-          String tableN = "";
-          EditionFieldsData[] dataSearchs = null;
-          if (fieldsDef[i].referencevalue.equals("30"))
-            dataSearchs = EditionFieldsData.selectSearchs(pool, "", fieldsDef[i].type);
-          if (dataSearchs == null || dataSearchs.length == 0) {
-            if (fieldsDef[i].referencevalue.equals("25"))
-              tableN = "C_ValidCombination";
-            else if (fieldsDef[i].referencevalue.equals("31"))
-              tableN = "M_Locator";
-            else if (fieldsDef[i].referencevalue.equals("35"))
-              tableN = "M_AttributeSetInstance";
-            else if (fieldsDef[i].referencevalue.equals("800011"))
-              tableN = "M_Product";
-            else if (fieldsDef[i].name.equalsIgnoreCase("createdBy")
-                || fieldsDef[i].name.equalsIgnoreCase("updatedBy"))
-              tableN = "AD_User";
-            else
-              tableN = fieldsDef[i].name.substring(0, fieldsDef[i].name.length() - 3);
-            if (fieldsDef[i].referencevalue.equals("25"))
-              fieldsDef[i].name = "C_ValidCombination_ID";
-            else if (fieldsDef[i].referencevalue.equals("31"))
-              fieldsDef[i].name = "M_Locator_ID";
-            else if (fieldsDef[i].referencevalue.equals("35"))
-              fieldsDef[i].name = "M_AttributeSetInstance_ID";
-            else if (fieldsDef[i].referencevalue.equals("800011"))
-              fieldsDef[i].name = "M_Product_ID";
-            else if (fieldsDef[i].name.equalsIgnoreCase("createdBy")
-                || fieldsDef[i].name.equalsIgnoreCase("updatedBy"))
-              fieldsDef[i].name = "AD_User_ID";
-          } else {
-            tableN = dataSearchs[0].reference;
-            fieldsDef[i].name = dataSearchs[0].columnname;
-          }
-          final Vector<Object> vecFields2 = new Vector<Object>();
-          final Vector<Object> vecTables2 = new Vector<Object>();
-          final Vector<Object> vecWhere2 = new Vector<Object>();
-          int itable2 = 0;
-          vecTables2.addElement(tableN + " table1");
-          itable2 = fieldsOfSearch2(tableN, fieldsDef[i].name, fieldsDef[i].required, vecFields2,
-              vecTables2, vecWhere2, itable2, fieldsDef[i].referencevalue, fieldsDef[i].type);
-          final StringBuffer strFields2 = new StringBuffer();
-          strFields2.append(" ( ");
-          boolean boolFirst = true;
-          for (final Enumeration<Object> e = vecFields2.elements(); e.hasMoreElements();) {
-            final String tableField = (String) e.nextElement();
-            log4j.debug("  field: " + tableField);
-            if (boolFirst) {
-              boolFirst = false;
-            } else {
-              strFields2.append(" || ' - ' || ");
-            }
-            strFields2.append("COALESCE(TO_CHAR(").append(tableField).append("), '') ");
-          }
-          strFields2.append(") as ").append(fieldsDef[i].columnname);
-          final StringBuffer fields = new StringBuffer();
-          fields.append("SELECT ").append(strFields2);
-          fields.append(" FROM ");
-          for (int j = 0; j < vecTables2.size(); j++) {
-            fields.append(vecTables2.elementAt(j));
-          }
-          fields.append(" WHERE table1.isActive='Y'");
-          for (int j = 0; j < vecWhere2.size(); j++) {
-            fields.append(vecWhere2.elementAt(j));
-          }
-          fields.append(" AND table1." + fieldsDef[i].name + " = ? ");
-          fd.defaultvalue = fields.toString();
-          fd.whereclause = "<Parameter name=\"" + fd.name + "\"/>";
-          v.addElement(fd);
-        } else if (fieldsDef[i].referencevalue.equals("32") && fieldsDef[i].isdisplayed.equals("Y")) {
-          final FieldsData fd = new FieldsData();
-          fd.reference = fieldsDef[i].reference + "_" + (itable++);
-          fd.name = fieldsDef[i].columnname + "R";
-          final String tableN = "AD_Image";
-          fieldsDef[i].name = fieldsDef[i].name;
-          final Vector<Object> vecTables2 = new Vector<Object>();
-          final Vector<Object> vecWhere2 = new Vector<Object>();
-          vecTables2.addElement(tableN + " table1");
-          final StringBuffer strFields2 = new StringBuffer();
-          strFields2.append(" ( table1.ImageURL ) AS ").append(fieldsDef[i].columnname);
-          final StringBuffer fields = new StringBuffer();
-          fields.append("SELECT ").append(strFields2);
-          fields.append(" FROM ");
-          for (int j = 0; j < vecTables2.size(); j++) {
-            fields.append(vecTables2.elementAt(j));
-          }
-          fields.append(" WHERE table1.isActive='Y'");
-          for (int j = 0; j < vecWhere2.size(); j++) {
-            fields.append(vecWhere2.elementAt(j));
-          }
-          fields.append(" AND table1." + fieldsDef[i].name + " = ? ");
-          fd.defaultvalue = fields.toString();
-          fd.whereclause = "<Parameter name=\"" + fd.name + "\"/>";
-          v.addElement(fd);
-        }
+
+        // Calculate additional defaults
+        WADControl control = WadUtility.getWadControlClass(pool, fieldsDef[i].referencevalue,
+            fieldsDef[i].type);
+        itable = control.addAdditionDefaulSQLFields(v, fieldsDef[i], itable);
       }
       final FieldsData[] fd = new FieldsData[v.size()];
       v.copyInto(fd);
       xmlDocumentXsql.setData("structure10", fd);
     }
     {
+      // default values for search references in parameter windows for action buttons
+      // keep it hardcoded by now
       final ProcessRelationData[] data = ProcessRelationData.selectXSQL(pool, strTab);
       if (data != null) {
         for (int i = 0; i < data.length; i++) {
@@ -3163,7 +2715,7 @@
       final FieldsData fieldsDataUpdate[] = FieldsData.selectUpdatables(pool, strTab);
       for (int i = 0; i < fieldsDataUpdate.length; i++) { // *** i=1?
         fieldsDataUpdate[i].name = ((i > 0) ? ", " : "") + fieldsDataUpdate[i].name;
-        if (WadUtility.isTimeField(fieldsDataUpdate[i].reference))
+        if (fieldsDataUpdate[i].reference.equals("24"))
           fieldsDataUpdate[i].xmlFormat = "TO_TIMESTAMP(?,'HH24:MI:SS')";
         else if (fieldsDataUpdate[i].reference.equals("16")) { // datetime
           fieldsDataUpdate[i].xmlFormat = "TO_DATE(?, ?)";
@@ -3217,7 +2769,7 @@
             && !fieldsDataValue[i].name.equalsIgnoreCase("CreatedBy")
             && !fieldsDataValue[i].name.equalsIgnoreCase("Updated")
             && !fieldsDataValue[i].name.equalsIgnoreCase("UpdatedBy")) {
-          if (WadUtility.isTimeField(fieldsDataValue[i].reference)) {
+          if (fieldsDataValue[i].reference.equals("24")) {
             fieldsDataValue[i].name = ((i > 0) ? ", " : "") + "TO_TIMESTAMP(?, 'HH24:MI:SS')";
           } else if (fieldsDataValue[i].reference.equals("16")) {
             // datetime
@@ -3259,6 +2811,7 @@
       xmlDocumentXsql.setData("structure7", fieldsDataParameterInsert1);
     }
     {
+      // generate set() method
       final FieldsData fieldsDataDefaults[] = FieldsData.selectDefaultValue(pool, "", strTab);
       final Vector<Object> vecDDef = new Vector<Object>();
       for (int i = 0; i < fieldsDataDefaults.length; i++) {
@@ -3271,14 +2824,14 @@
           vecDDef.addElement(fieldsDataDefaults[i]);
           modified = true;
         }
-        if ((fieldsDataDefaults[i].referencevalue.equals("30")
-            || fieldsDataDefaults[i].reference.equals("800011")
-            || fieldsDataDefaults[i].referencevalue.equals("31")
-            || fieldsDataDefaults[i].referencevalue.equals("32")
-            || fieldsDataDefaults[i].referencevalue.equals("35")
-            || fieldsDataDefaults[i].referencevalue.equals("21") || fieldsDataDefaults[i].referencevalue
-            .equals("25"))
-            && fieldsDataDefaults[i].isdisplayed.equals("Y")) {
+
+        // add another field for default special cases with more than 1 field
+        WADControl control = WadUtility.getWadControlClass(pool,
+            fieldsDataDefaults[i].referencevalue, fieldsDataDefaults[i].type);
+        if (fieldsDataDefaults[i].isdisplayed.equals("Y")
+            && control.addAdditionDefaulJavaFields(new StringBuffer(), fieldsDataDefaults[i],
+                tabName, 0) != 0) {
+
           final FieldsData f = new FieldsData();
           f.name = (modified ? fieldsDataDefaults[i].name : Sqlc
               .TransformaNombreColumna(fieldsDataDefaults[i].name))
@@ -3290,6 +2843,7 @@
         } else if (fieldsDataDefaults[i].referencevalue.equals("28")
             && fieldsDataDefaults[i].isdisplayed.equals("Y")
             && !fieldsDataDefaults[i].type.equals("")) {
+          // Button special case
           final FieldsData f = new FieldsData();
           f.name = (modified ? fieldsDataDefaults[i].name : Sqlc
               .TransformaNombreColumna(fieldsDataDefaults[i].name))
@@ -3331,6 +2885,8 @@
    * Generates the combo reloads for the tab. Combo reloads are the callouts to reloads the values
    * of the subordinated combos in the tab.
    * 
+   * By now combo reloads are created only for core list, table and table dir references
+   * 
    * @param fileDir
    *          Path where to generate the file.
    * @param strTab
@@ -3356,6 +2912,9 @@
     xmlDocument.setParameter("tabId", strTab);
     final Vector<Object> vecReloads = new Vector<Object>();
     final Vector<Object> vecTotal = new Vector<Object>();
+    final Vector<Object> vecCounters = new Vector<Object>();
+    vecCounters.addElement("0");
+    vecCounters.addElement("0");
     FieldsData[] result = null;
 
     for (int i = 0; i < data.length; i++) {
@@ -3406,8 +2965,12 @@
             final Vector<Object> vecWhere = new Vector<Object>();
             final Vector<Object> vecParameters = new Vector<Object>();
             final Vector<Object> vecTableParameters = new Vector<Object>();
-            WadUtility.columnIdentifier(pool, tables[0].tablename, true, tables[0], 0, 0, true,
-                vecFields1, vecTables, vecWhere, vecParameters, vecTableParameters, sqlDateFormat);
+
+            WADControl control = WadUtility.getWadControlClass(pool, data[i].reference,
+                data[i].referencevalue);
+            control.columnIdentifier(tables[0].tablename, tables[0], vecCounters, vecFields1, vecTables,
+                vecWhere, vecParameters, vecTableParameters);
+
             where.append(tables[0].whereclause);
             data[i].tablename = "TableList";
             data[i].htmltext = "select" + tables[0].referencevalue;
@@ -3446,8 +3009,12 @@
             final Vector<Object> vecWhere = new Vector<Object>();
             final Vector<Object> vecParameters = new Vector<Object>();
             final Vector<Object> vecTableParameters = new Vector<Object>();
-            WadUtility.columnIdentifier(pool, table_Name, true, tableDir[0], 0, 0, true,
-                vecFields1, vecTables, vecWhere, vecParameters, vecTableParameters, sqlDateFormat);
+
+            WADControl control = WadUtility.getWadControlClass(pool, data[i].reference,
+                data[i].referencevalue);
+            control.columnIdentifier(table_Name, data[i], vecCounters, vecFields1, vecTables, vecWhere,
+                vecParameters, vecTableParameters);
+
             data[i].xmltext = "";
             if (vecTableParameters.size() > 0) {
               data[i].xmltext = ", vars.getLanguage()";
@@ -3514,6 +3081,9 @@
 
       final Vector<Object> vecReloads = new Vector<Object>();
       final Vector<Object> vecTotal = new Vector<Object>();
+      final Vector<Object> vecCounters = new Vector<Object>();
+      vecCounters.addElement("0");
+      vecCounters.addElement("0");
 
       FieldsData[] result = null;
 
@@ -3554,9 +3124,14 @@
             final Vector<Object> vecWhere = new Vector<Object>();
             final Vector<Object> vecParameters = new Vector<Object>();
             final Vector<Object> vecTableParameters = new Vector<Object>();
-            WadUtility.columnIdentifier(pool, tables[0].tablename, true, tables[0], 0, 0, true,
-                vecFields1, vecTables, vecWhere, vecParameters, vecTableParameters, sqlDateFormat);
+
+            WADControl control = WadUtility.getWadControlClass(pool, data[i].reference,
+                data[i].referencevalue);
+            control.columnIdentifier(tables[0].tablename, tables[0], vecCounters, vecFields1, vecTables,
+                vecWhere, vecParameters, vecTableParameters);
+
             where.append(tables[0].whereclause);
+
             data[i].tablename = "TableList";
             data[i].htmltext = "select" + tables[0].referencevalue;
             if (!tables[0].columnname.equals("")) {
@@ -3594,8 +3169,12 @@
             final Vector<Object> vecWhere = new Vector<Object>();
             final Vector<Object> vecParameters = new Vector<Object>();
             final Vector<Object> vecTableParameters = new Vector<Object>();
-            WadUtility.columnIdentifier(pool, table_Name, true, tableDir[0], 0, 0, true,
-                vecFields1, vecTables, vecWhere, vecParameters, vecTableParameters, sqlDateFormat);
+
+            WADControl control = WadUtility.getWadControlClass(pool, data[i].reference,
+                data[i].referencevalue);
+            control.columnIdentifier(table_Name, data[i], vecCounters, vecFields1, vecTables, vecWhere,
+                vecParameters, vecTableParameters);
+
             data[i].xmltext = "";
             if (vecTableParameters.size() > 0) {
               data[i].xmltext = ", vars.getLanguage()";
@@ -4414,10 +3993,12 @@
       firstFocus = "'firstElement'";
     } else {
       String id = ff[0].columnname;
-      if (WadUtility.isSearchType(ff[0].reference))
+      String reference = ff[0].reference;
+      if (reference.equals("21") || reference.equals("25") || reference.equals("30")
+          || reference.equals("31") || reference.equals("32") || reference.equals("35")
+          || reference.equals("800013") || reference.equals("800011"))
         id += "_R";
-      if (ff[0].reference.equals("17") || ff[0].reference.equals("18")
-          || ff[0].reference.equals("19"))
+      if (reference.equals("17") || reference.equals("18") || reference.equals("19"))
         id = "report" + id + "_S";
       firstFocus = "'" + id + "', 'id'";
     }
@@ -4614,188 +4195,6 @@
   }
 
   /**
-   * Auxiliar method to get the query for a tableDir control.
-   * 
-   * @param tableInit
-   *          The name of the parent table.
-   * @param name
-   *          The name of the reference column.
-   * @param required
-   *          Is a required join
-   * @param vecFields
-   *          Vector with the select clause.
-   * @param vecTables
-   *          Vector with the from clause.
-   * @param vecWhere
-   *          Vector with the where clause.
-   * @throws ServletException
-   */
-  public void fieldsOfTableDir(String tableInit, String name, String required,
-      Vector<Object> vecFields, Vector<Object> vecTables, Vector<Object> vecWhere)
-      throws ServletException {
-    final int ilength = name.length();
-    final String tableName = name.substring(0, ilength - 3);
-    final FieldsData fdi[] = FieldsData.identifierColumns(pool, tableName);
-    vecTables.addElement("left join " + tableName + " on (" + tableInit + "." + name + " = "
-        + tableName + "." + name + ")");
-    for (int i = 0; i < fdi.length; i++) {
-      if (fdi[i].reference.equals("19"))
-        fieldsOfTableDir(tableName, fdi[i].name, fdi[i].required, vecFields, vecTables, vecWhere);
-      else
-        vecFields.addElement(tableName + "." + fdi[i].name);
-    }
-  }
-
-  /**
-   * Auxiliar method to get the query for a search control.
-   * 
-   * @param tableInit
-   *          The name of the parent table.
-   * @param name
-   *          The name of the reference column.
-   * @param FilterName
-   *          The filtered name with the real name of the reference column.
-   * @param required
-   *          Is a required join.
-   * @param vecFields
-   *          Vector with the select clause.
-   * @param vecTables
-   *          Vector with the from clause.
-   * @param vecWhere
-   *          Vector with the where clause.
-   * @param itable
-   *          Index to naming the alias of the join tables.
-   * @param reference
-   *          The reference id.
-   * @param referencevalue
-   *          The id of the reference value.
-   * @return Int with the new index to naming the aliases.
-   * @throws ServletException
-   */
-  public int fieldsOfSearch(String tableInit, String name, String FilterName, String required,
-      Vector<Object> vecFields, Vector<Object> vecTables, Vector<Object> vecWhere, int itable,
-      String reference, String referencevalue) throws ServletException {
-    itable++;
-    final int tableNum = itable;
-    EditionFieldsData[] dataSearchs = null;
-    if (reference.equals("30") && !referencevalue.equals(""))
-      dataSearchs = EditionFieldsData.selectSearchs(pool, "", referencevalue);
-    String tableName = "";
-    if (dataSearchs == null || dataSearchs.length == 0) {
-      final int ilength = FilterName.length();
-      if (reference.equals("25"))
-        tableName = "C_ValidCombination";
-      else if (reference.equals("31"))
-        tableName = "M_Locator";
-      else if (reference.equals("800011"))
-        tableName = "M_Product";
-      else
-        tableName = FilterName.substring(0, ilength - 3);
-      if (reference.equals("25"))
-        FilterName = "C_ValidCombination_ID";
-      else if (reference.equals("31"))
-        FilterName = "M_Locator_ID";
-      else if (reference.equals("800011"))
-        FilterName = "M_Product_ID";
-    } else {
-      tableName = dataSearchs[0].reference;
-      FilterName = dataSearchs[0].columnname;
-    }
-    final FieldsData fdi[] = FieldsData.identifierColumns(pool, tableName);
-    final StringBuffer fieldsAux = new StringBuffer();
-    for (int i = 0; i < fdi.length; i++) {
-      if (!fdi[i].columnname.equalsIgnoreCase(FilterName))
-        fieldsAux.append(", ").append(fdi[i].columnname);
-    }
-    vecTables.addElement("left join (select " + FilterName + fieldsAux.toString() + " from "
-        + tableName + ") table" + tableNum + " on (" + tableInit + "." + name + " = table"
-        + tableNum + "." + FilterName + ")");
-    for (int i = 0; i < fdi.length; i++) {
-      if (fdi[i].reference.equals("30") || fdi[i].reference.equals("31")
-          || fdi[i].reference.equals("35") || fdi[i].reference.equals("25")
-          || fdi[i].reference.equals("800011") || fdi[i].reference.equals("19")) {
-        itable = fieldsOfSearch("table" + tableNum, fdi[i].name, fdi[i].columnname, required,
-            vecFields, vecTables, vecWhere, itable, fdi[i].reference, fdi[i].referencevalue);
-      } else {
-        vecFields.addElement("table" + tableNum + "." + fdi[i].columnname);
-      }
-    }
-    return itable;
-  }
-
-  /**
-   * Auxiliar method to get the query for a search control. This'll be used to build combo's
-   * controls.
-   * 
-   * @param tableInit
-   *          The name of the parent table.
-   * @param name
-   *          The name of the reference column.
-   * @param required
-   *          Is a required join.
-   * @param vecFields
-   *          Vector with the select clause.
-   * @param vecTables
-   *          Vector with the from clause.
-   * @param vecWhere
-   *          Vector with the where clause.
-   * @param itable
-   *          Index to naming the alias of the join tables.
-   * @param reference
-   *          The reference id.
-   * @param referencevalue
-   *          The id of the reference value.
-   * @return Int with the new index to naming the aliases.
-   * @throws ServletException
-   */
-  public int fieldsOfSearch2(String tableInit, String name, String required,
-      Vector<Object> vecFields, Vector<Object> vecTables, Vector<Object> vecWhere, int itable,
-      String reference, String referencevalue) throws ServletException {
-    itable++;
-    final int tableNum = itable;
-    String tableName = "";
-    EditionFieldsData[] dataSearchs = null;
-    if (reference.equals("30") && !referencevalue.equals(""))
-      dataSearchs = EditionFieldsData.selectSearchs(pool, "", referencevalue);
-    if (dataSearchs == null || dataSearchs.length == 0) {
-      final int ilength = name.length();
-      if (reference.equals("25"))
-        tableName = "C_ValidCombination";
-      else if (reference.equals("31"))
-        tableName = "M_Locator";
-      else if (reference.equals("800011"))
-        tableName = "M_Product";
-      else
-        tableName = name.substring(0, ilength - 3);
-      if (reference.equals("25"))
-        name = "C_ValidCombination_ID";
-      else if (reference.equals("31"))
-        name = "M_Locator_ID";
-      else if (reference.equals("800011"))
-        name = "M_Product_ID";
-    } else {
-      tableName = dataSearchs[0].reference;
-      name = dataSearchs[0].columnname;
-    }
-    final FieldsData fdi[] = FieldsData.identifierColumns(pool, tableName);
-    if (itable > 1) {
-      vecTables.addElement(" left join " + tableName + " table" + tableNum + " on (" + tableInit
-          + "." + name + " = table" + tableNum + "." + name + ")");
-    }
-    for (int i = 0; i < fdi.length; i++) {
-      if (fdi[i].reference.equals("30") || fdi[i].reference.equals("800011")
-          || fdi[i].reference.equals("31") || fdi[i].reference.equals("35")
-          || fdi[i].reference.equals("25")) {
-        itable = fieldsOfSearch2("table" + tableNum, fdi[i].columnname, fdi[i].required, vecFields,
-            vecTables, vecWhere, itable, fdi[i].reference, fdi[i].referencevalue);
-      } else {
-        vecFields.addElement("table" + tableNum + "." + fdi[i].columnname);
-      }
-    }
-    return itable;
-  }
-
-  /**
    * Method to prepare the XmlEngine object, which is the one in charged of the templates.
    * 
    * @param fileConnection
@@ -4822,6 +4221,7 @@
    */
   public void createPool(String strFileConnection) {
     pool = new WadConnection(strFileConnection);
+    WADControl.setConnection(pool);
   }
 
   /**
@@ -4907,6 +4307,7 @@
       jsDateFormat = properties.getProperty("dateFormat.js");
       log4j.info("jsDateFormat: " + jsDateFormat);
       sqlDateFormat = properties.getProperty("dateFormat.sql");
+      WADControl.setDateFormat(sqlDateFormat);
       log4j.info("sqlDateFormat: " + sqlDateFormat);
     } catch (final IOException e) {
       // catch possible io errors from readLine()
--- a/src-wad/src/org/openbravo/wad/WadActionButton.java	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/WadActionButton.java	Thu Feb 11 12:10:47 2010 +0100
@@ -44,40 +44,6 @@
   static final int IMAGE_EDITION_HEIGHT = 16;
 
   /**
-   * Checks if the given reference is a numeric type
-   * 
-   * @param reference
-   *          The reference to check.
-   * @return Boolean that indicates if the reference is a numeric type or not.
-   */
-  public static boolean isNumericType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    if (WadUtility.isGeneralNumber(reference) || WadUtility.isDecimalNumber(reference)
-        || WadUtility.isPriceNumber(reference) || WadUtility.isIntegerNumber(reference)
-        || WadUtility.isQtyNumber(reference)) {
-      return true;
-    }
-    return false;
-  }
-
-  /**
-   * Checks if the given reference is a date type
-   * 
-   * @param reference
-   *          The reference to check.
-   * @return Boolean that indicates if the reference is a date type or not.
-   */
-  public static boolean isDateType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    if (WadUtility.isDateTimeField(reference)) {
-      return true;
-    }
-    return false;
-  }
-
-  /**
    * Generates the action button call for the java of the window.
    * 
    * @param conn
@@ -139,7 +105,7 @@
             vecParams.addElement("changeprojectstatus");
           } else
             fab[i].processParams = "";
-          fab[i].processParams += getProcessParamsJava(data, fab[i], vecParams, false);
+          fab[i].processParams += getProcessParamsJava(conn, data, fab[i], vecParams, false);
           fab[i].processCode = "ActionButtonData.process" + fab[i].adProcessId
               + "(this, pinstance);\n";
         }
@@ -208,7 +174,7 @@
           }
 
           fab[i].processParams = "";
-          fab[i].processParams += getProcessParamsJava(data, fab[i], vecParams, true);
+          fab[i].processParams += getProcessParamsJava(conn, data, fab[i], vecParams, true);
           fab[i].processCode = "new " + fab[i].classname + "().execute(pb);";
         }
       }
@@ -280,7 +246,7 @@
             vecParams.addElement("changeprojectstatus");
           } else
             fab[i].processParams = "";
-          fab[i].processParams += getProcessParamsJava(data, fab[i], vecParams, false);
+          fab[i].processParams += getProcessParamsJava(conn, data, fab[i], vecParams, false);
           fab[i].processCode = "ActionButtonData.process" + fab[i].adProcessId
               + "(this, pinstance);\n";
         }
@@ -323,7 +289,7 @@
             data = ProcessRelationData.selectParameters(conn, "", fab[i].adProcessId);
           } catch (final ServletException e) {
           }
-          fab[i].processParams = getProcessParamsJava(data, fab[i], vecParams, true);
+          fab[i].processParams = getProcessParamsJava(conn, data, fab[i], vecParams, true);
         }
 
         fab[i].processCode = "new " + fab[i].classname + "().execute(pb);";
@@ -603,7 +569,7 @@
    *          Vector of parameters.
    * @return String with all the calls.
    */
-  public static String getProcessParamsJava(ProcessRelationData[] data,
+  public static String getProcessParamsJava(ConnectionProvider conn, ProcessRelationData[] data,
       ActionButtonRelationData fd, Vector<Object> vecParams, boolean isGenericJava) {
     if (fd == null)
       return "";
@@ -613,7 +579,9 @@
       for (int i = 0; i < data.length; i++) {
         html.append("String str" + Sqlc.TransformaNombreColumna(data[i].columnname));
 
-        if (WadActionButton.isNumericType(data[i].reference)) {
+        WADControl control = WadUtility.getWadControlClass(conn, data[i].reference,
+            data[i].adReferenceValueId);
+        if (control.isNumericType()) {
           html.append(" = vars.getNumericParameter");
         } else {
           html.append(" = vars.getStringParameter");
@@ -629,9 +597,8 @@
                   ");\n");
         } else {
           html.append("PInstanceProcessData.insertPInstanceParam"
-              + (isNumericType(data[i].adReferenceId) ? "Number"
-                  : (isDateType(data[i].adReferenceId) ? "Date" : "")) + "(this, pinstance, \""
-              + data[i].seqno + "\", \"" + data[i].columnname + "\", str"
+              + (control.isNumericType() ? "Number" : (control.isDate() ? "Date" : ""))
+              + "(this, pinstance, \"" + data[i].seqno + "\", \"" + data[i].columnname + "\", str"
               + Sqlc.TransformaNombreColumna(data[i].columnname)
               + ", vars.getClient(), vars.getOrg(), vars.getUser());\n");
         }
@@ -950,285 +917,6 @@
     WadUtility.writeFile(fileDir, (fd.columnname + fd.reference) + ".html", xmlDocument.print());
   }
 
-  /*
-   * ########################################################################## #############
-   */
-  /**
-   * Sets the correct format parameter for the xml, which depends on the column type.
-   * 
-   * @param data
-   *          Object with the column info.
-   */
-  public static void xmlFormatAttribute(ProcessRelationData data) {
-    if (data == null)
-      return;
-    if (WadUtility.isIntegerNumber(data.adReferenceId))
-      data.xmlFormat = "INTEGER";
-    else if (WadUtility.isDecimalNumber(data.adReferenceId))
-      data.xmlFormat = "EURO";
-    else if (WadUtility.isQtyNumber(data.adReferenceId))
-      data.xmlFormat = "QTY";
-    else if (WadUtility.isPriceNumber(data.adReferenceId))
-      data.xmlFormat = "PRICE";
-  }
-
-  /**
-   * Returns the string with the xml fields for the xml file.
-   * 
-   * @param fd
-   *          Object with the column info.
-   * @param completeName
-   *          Complete name of the column.
-   * @param maxTextboxLength
-   *          Maximum size for a textbox control.
-   * @param forcedAttribute
-   *          Indicates if the column is a parameter or not.
-   * @return String with the xml code.
-   */
-  public static String xmlFields(ProcessRelationData fd, String completeName, int maxTextboxLength,
-      boolean forcedAttribute) {
-    final StringBuffer html = new StringBuffer();
-    final String strSystemSeparator = System.getProperty("file.separator");
-
-    if (forcedAttribute) {
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("attribute=\"value\"");
-      if (WadUtility.isDecimalNumber(fd.adReferenceId))
-        html.append(" format=\"euroEdition\"");
-      else if (WadUtility.isQtyNumber(fd.adReferenceId))
-        html.append(" format=\"qtyEdition\"");
-      else if (WadUtility.isPriceNumber(fd.adReferenceId))
-        html.append(" format=\"priceEdition\"");
-      else if (WadUtility.isIntegerNumber(fd.adReferenceId))
-        html.append(" format=\"integerEdition\"");
-      else if (WadUtility.isGeneralNumber(fd.adReferenceId))
-        html.append(" format=\"generalQtyEdition\"");
-      html.append(">");
-      html.append("</PARAMETER>");
-    } else if (fd.adReferenceId.equals("17") || fd.adReferenceId.equals("18")
-        || fd.adReferenceId.equals("19")) { // List
-      html.append(xmlFields(fd, completeName, maxTextboxLength, true));
-      if (fd.isdisplayed.equals("Y")) {
-        html.append("\n<SUBREPORT id=\"report" + Sqlc.TransformaNombreColumna(fd.columnname)
-            + completeName + "\" name=\"report" + Sqlc.TransformaNombreColumna(fd.columnname)
-            + completeName + "\"");
-        html.append(" report=\"org" + strSystemSeparator + "openbravo" + strSystemSeparator
-            + "erpCommon" + strSystemSeparator + "reference" + strSystemSeparator + "List\">\n");
-        html.append("  <ARGUMENT name=\"parameterListSelected\" withId=\""
-            + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\"/>\n");
-        html.append("</SUBREPORT>\n");
-      }
-    } else if (fd.adReferenceId.equals("20") && fd.isdisplayed.equals("Y")) { // YesNo
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("boolean=\"checked\" withId=\"paramCheck\"");
-      html.append(">");
-      html.append("</PARAMETER>");
-    } else if (fd.adReferenceId.equals("28") && fd.isdisplayed.equals("Y")
-        && !fd.adReferenceValueId.equals("")) { // Button
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append(" attribute=\"value\">");
-      html.append(Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "</PARAMETER>");
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "_BTN\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\">");
-      html.append("</PARAMETER>");
-    } else if ((fd.adReferenceId.equals("34") || fd.adReferenceId.equals("14"))
-        && fd.isdisplayed.equals("Y")) {
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append(">");
-      html.append("</PARAMETER>");
-    } else if (Integer.valueOf(fd.fieldlength).intValue() > maxTextboxLength
-        && fd.isdisplayed.equals("Y")) {
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      if (WadUtility.isDecimalNumber(fd.adReferenceId))
-        html.append(" format=\"euroEdition\"");
-      else if (WadUtility.isQtyNumber(fd.adReferenceId))
-        html.append(" format=\"qtyEdition\"");
-      else if (WadUtility.isPriceNumber(fd.adReferenceId))
-        html.append(" format=\"priceEdition\"");
-      else if (WadUtility.isIntegerNumber(fd.adReferenceId))
-        html.append(" format=\"integerEdition\"");
-      else if (WadUtility.isGeneralNumber(fd.adReferenceId))
-        html.append(" format=\"generalQtyEdition\"");
-      html.append(">");
-      html.append("</PARAMETER>");
-    } else {
-      html.append("<PARAMETER ");
-      html.append("id=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("name=\"" + Sqlc.TransformaNombreColumna(fd.columnname) + completeName + "\" ");
-      html.append("attribute=\"value\"");
-      if (WadUtility.isDecimalNumber(fd.adReferenceId))
-        html.append(" format=\"euroEdition\"");
-      else if (WadUtility.isQtyNumber(fd.adReferenceId))
-        html.append(" format=\"qtyEdition\"");
-      else if (WadUtility.isPriceNumber(fd.adReferenceId))
-        html.append(" format=\"priceEdition\"");
-      else if (WadUtility.isIntegerNumber(fd.adReferenceId))
-        html.append(" format=\"integerEdition\"");
-      else if (WadUtility.isGeneralNumber(fd.adReferenceId))
-        html.append(" format=\"generalQtyEdition\"");
-      html.append(">");
-      html.append("</PARAMETER>");
-    }
-
-    return html.toString();
-  }
-
-  /**
-   * Returns the specific class for the column.
-   * 
-   * @param efd
-   *          Object with the column info.
-   * @return String with the class.
-   */
-  public static String classRequiredUpdateable(ProcessRelationData efd) {
-    final StringBuffer htmltext = new StringBuffer();
-    String strAux = "";
-    if (WadUtility.isGeneralNumber(efd.adReferenceId)
-        || WadUtility.isDecimalNumber(efd.adReferenceId)
-        || WadUtility.isQtyNumber(efd.adReferenceId) || WadUtility.isPriceNumber(efd.adReferenceId)
-        || WadUtility.isIntegerNumber(efd.adReferenceId)) {
-      strAux = " number";
-    }
-    String strType = "dojoValidateValid";
-    String classType = "TextBox";
-    if (WadUtility.isSelectType(efd.adReferenceId)) {
-      strType = "Combo";
-      classType = "Combo";
-    }
-    if (efd.required.equals("Y"))
-      htmltext.append(" class=\"").append(strType).append(" required").append(strAux).append(" ")
-          .append(classType).append("_OneCell_width\" ");
-    else if (!strAux.equals(""))
-      htmltext.append(" class=\"").append(strType).append(strAux).append(" ").append(classType)
-          .append("_OneCell_width\" ");
-
-    return htmltext.toString();
-  }
-
-  /**
-   * Returns the code of a control in html.
-   * 
-   * @param efd
-   *          Object with the column info.
-   * @param completeName
-   *          Suffix for the name.
-   * @param completeID
-   *          Suffix for the id.
-   * @param isupdateable
-   *          If is an updateable column.
-   * @param maxTextboxLength
-   *          Maximum size for the textbox control.
-   * @param forcedAttribute
-   *          If is an attribute.
-   * @param isdesigne
-   *          If is a design control.
-   * @return String with the html code.
-   */
-  public static String htmlFields(ProcessRelationData efd, String completeName, String completeID,
-      boolean isupdateable, int maxTextboxLength, boolean forcedAttribute, boolean isdesigne) {
-    final StringBuffer html = new StringBuffer();
-
-    if (forcedAttribute) {
-      html.append("<input type=\"hidden\"");
-      html.append(" name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnname) + completeName);
-      html.append("\" id=\"" + Sqlc.TransformaNombreColumna(efd.columnname) + completeID
-          + "\" value=\"");
-      if (!isdesigne)
-        html.append("xxV");
-      if (WadUtility.isGeneralNumber(efd.adReferenceId)
-          || WadUtility.isDecimalNumber(efd.adReferenceId)
-          || WadUtility.isQtyNumber(efd.adReferenceId)
-          || WadUtility.isPriceNumber(efd.adReferenceId))
-        html.append("\" onkeydown=\"autoCompleteNumber(this, true, true, event);return true;");
-      else if (WadUtility.isIntegerNumber(efd.adReferenceId))
-        html.append("\" onkeydown=\"autoCompleteNumber(this, false, true, event);return true;");
-      html.append("\">");
-    } else if ((efd.adReferenceId.equals("17") || efd.adReferenceId.equals("18") || efd.adReferenceId
-        .equals("19"))
-        && efd.isdisplayed.equals("Y")) { // List or Table or TableDir
-      html.append("<select name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnname)
-          + completeName + "\"");
-      html.append(classRequiredUpdateable(efd));
-      html.append(" id=\"report");
-      html.append(efd.columnname + completeID + "_S\"");
-      html.append(">");
-      if (!efd.required.equals("Y"))
-        html.append("<option value=\"\"></option>");
-      html.append("<div id=\"report");
-      html.append(Sqlc.TransformaNombreColumna(efd.columnname) + completeID + "\"></div>");
-      html.append("</select>");
-    } else if ((efd.adReferenceId.equals("34") || efd.adReferenceId.equals("14") || (!efd.adReferenceId
-        .equals("20") && (Integer.valueOf(efd.fieldlength).intValue() > maxTextboxLength)))
-        && efd.isdisplayed.equals("Y")) { // TEXTAREA
-      html.append("<textarea cols=\"" + efd.fieldlength + "\" rows=\"3\" name=\"inp"
-          + Sqlc.TransformaNombreColumna(efd.columnname));
-      html.append(completeName + "\" id=\"" + Sqlc.TransformaNombreColumna(efd.columnname)
-          + completeID + "\" ");
-      html.append(classRequiredUpdateable(efd));
-      html.append(">");
-      if (!isdesigne)
-        html.append("xxV");
-      html.append("</textarea>");
-    } else {
-      html.append("<input type=\"");
-      if (efd.isdisplayed.equals("N")) {
-        html.append("hidden\"");
-      } else if (efd.adReferenceId.equals("20")) { // YesNo
-        html.append("checkbox\"");
-      } else {
-        html.append("text\"");
-        if (WadUtility.isGeneralNumber(efd.adReferenceId)
-            || WadUtility.isDecimalNumber(efd.adReferenceId)
-            || WadUtility.isQtyNumber(efd.adReferenceId)
-            || WadUtility.isPriceNumber(efd.adReferenceId))
-          html.append(" onkeydown=\"autoCompleteNumber(this, true, true, event);return true;\"");
-        else if (WadUtility.isIntegerNumber(efd.adReferenceId))
-          html.append(" onkeydown=\"autoCompleteNumber(this, false, true, event);return true;\"");
-        html.append(" size=\"" + efd.fieldlength + "\" ");
-        html.append(classRequiredUpdateable(efd));
-        if (!WadUtility.isSearchType(efd.adReferenceId))
-          html.append(" maxlength=\"" + efd.fieldlength + "\"");
-      }
-      html.append(" name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnname) + completeName);
-      html.append("\" id=\"" + Sqlc.TransformaNombreColumna(efd.columnname) + completeID + "\" ");
-      html.append("value=\"");
-      if (efd.isdisplayed.equals("N")) {
-        if (!isdesigne)
-          html.append("xxV");
-      } else if (efd.adReferenceId.equals("20")) {
-        html.append("Y");
-      } else {
-        if (!isdesigne)
-          html.append("xxV");
-      }
-      html.append("\"");
-      if (efd.isdisplayed.equals("Y") && isupdateable && WadUtility.isDateField(efd.adReferenceId)) { // Date.
-        // Put
-        // a
-        // calendar
-        html.append(" onkeyup=\"auto_completar_fecha(this);return true;\"");
-      } else if (efd.isdisplayed.equals("Y") && isupdateable
-          && WadUtility.isTimeField(efd.adReferenceId)) { // Time. Put
-        // a clock
-        html.append(" onkeyup=\"auto_completar_hora(this, true);return true;\"");
-      }
-      html.append(">");
-    }
-
-    return html.toString();
-  }
-
   /**
    * Searchs a field in a vector.
    * 
@@ -1249,155 +937,4 @@
     return "";
   }
 
-  /**
-   * Generates the js command for the searchs.
-   * 
-   * @param efd
-   *          Object with the column info.
-   * @param fromButton
-   *          Boolean that indicates if is a button.
-   * @param vecFields
-   *          Vector with the fields.
-   * @param conn
-   *          Object with the database connection.
-   * @return String with the js command.
-   */
-  public static String searchsCommand(ProcessRelationData efd, boolean fromButton,
-      Vector<Object> vecFields, ConnectionProvider conn) {
-    final StringBuffer params = new StringBuffer();
-    final StringBuffer html = new StringBuffer();
-    final String strName = FormatUtilities.replace(efd.searchname.trim());
-    if (!fromButton) {
-      params.append(", 'Command'");
-      params.append(", 'KEY'");
-    }
-    params.append(", 'WindowID'");
-    params.append(", document.frmMain.inpwindowId.value");
-    String searchName = ((efd.reference != null && efd.reference.equals("31")) ? "/info/Locator"
-        : "/info/" + strName)
-        + "_FS.html";
-    EditionFieldsData[] fieldsSearch = null;
-    try {
-      if (efd.reference != null && efd.reference.equals("30") && efd.adReferenceValueId != null
-          && !efd.adReferenceValueId.equals(""))
-        fieldsSearch = EditionFieldsData.selectSearchs(conn, "I", efd.adReferenceValueId);
-    } catch (final ServletException ex) {
-      ex.printStackTrace();
-    }
-    if (fieldsSearch != null && fieldsSearch.length > 0) {
-      searchName = fieldsSearch[0].mappingname;
-      if (!fieldsSearch[0].referencevalue.equals("")) {
-        for (int i = 0; i < fieldsSearch.length; i++) {
-          final String field = findField(vecFields, fieldsSearch[i].referencevalue);
-          if (!field.equals("")) {
-            params.append(", 'inp").append(fieldsSearch[i].columnnameinp).append("'");
-            params
-                .append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-          }
-        }
-      }
-    } else {
-      if (efd.name.equalsIgnoreCase("PRODUCT")) {
-        String field = findField(vecFields, "m_pricelist_id");
-        if (!field.equals("")) {
-          params.append(", 'inpPriceList'");
-          params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-        }
-        field = findField(vecFields, "m_warehouse_id");
-        if (!field.equals("")) {
-          params.append(", 'inpWarehouse'");
-          params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-        }
-        field = findField(vecFields, "dateordered");
-        if (!field.equals("")) {
-          params.append(", 'inpDate'");
-          params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-        }
-      }
-    }
-    html.append("openSearch(null, null, '..").append(searchName).append(
-        "', null, false, 'frmMain', 'inp").append(Sqlc.TransformaNombreColumna(efd.columnname))
-        .append("', 'inp").append(Sqlc.TransformaNombreColumna(efd.columnname)).append(
-            "_R', document.frmMain.inp").append(Sqlc.TransformaNombreColumna(efd.columnname))
-        .append("_R.value").append(params.toString()).append(");");
-    return html.toString();
-  }
-
-  /**
-   * Generates the html code of the search button.
-   * 
-   * @param efd
-   *          Object with the column info.
-   * @param maxTextboxLength
-   *          Maximum size for a textbox control.
-   * @param vecFields
-   *          Vector with the fields.
-   * @param conn
-   *          Object with the database connection.
-   * @return String with the button code.
-   */
-  public static String searchs(ProcessRelationData efd, int maxTextboxLength,
-      Vector<Object> vecFields, ConnectionProvider conn) {
-    final StringBuffer html = new StringBuffer();
-    String strName = FormatUtilities.replace(efd.searchname.trim());
-    if (efd.adReferenceId.equals("31")) {
-      strName = "Locator";
-    } else if (efd.name.toUpperCase().indexOf("BUSINESS") != -1) {
-      html.append(htmlFields(efd, "_LOC", "_LOC", true, maxTextboxLength, true, true));
-      html.append(htmlFields(efd, "_CON", "_CON", true, maxTextboxLength, true, true));
-    } else if (efd.name.equalsIgnoreCase("PRODUCT")) {
-      html.append(htmlFields(efd, "_PLIST", "_PLIST", true, maxTextboxLength, true, true));
-      html.append(htmlFields(efd, "_PSTD", "_PSTD", true, maxTextboxLength, true, true));
-      html.append(htmlFields(efd, "_UOM", "_UOM", true, maxTextboxLength, true, true));
-      html.append(htmlFields(efd, "_PLIM", "_PLIM", true, maxTextboxLength, true, true));
-      html.append(htmlFields(efd, "_CURR", "_CURR", true, maxTextboxLength, true, true));
-    }
-    html.append("<a href=\"#\"");
-    html.append("onClick=\"" + searchsCommand(efd, true, vecFields, conn) + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img width=\"").append(IMAGE_EDITION_WIDTH)
-        .append("\" height=\"").append(IMAGE_EDITION_HEIGHT).append("\" alt=\"").append(efd.name)
-        .append("\" title=\"").append(efd.name).append("\"");
-    html.append(" border=\"0\" src=\"../../../../../web/images/" + strName + ".jpg\" id=\"button"
-        + strName + "\"></a>");
-    return html.toString();
-  }
-
-  /**
-   * Generates the html code of the product search button.
-   * 
-   * @param efd
-   *          Object with the column info.
-   * @param maxTextboxLength
-   *          Maximum size of the textbox control.
-   * @param vecFields
-   *          Vector with the fields.
-   * @param conn
-   *          Object with the database connection.
-   * @return String with the control code.
-   */
-  public static String productSearch(ProcessRelationData efd, int maxTextboxLength,
-      Vector<Object> vecFields, ConnectionProvider conn) {
-    final StringBuffer html = new StringBuffer();
-    efd.searchname = "Product Complete";
-    html.append(htmlFields(efd, "_LOC", "_LOC", true, maxTextboxLength, true, true));
-    html.append(htmlFields(efd, "_ATR", "_ATR", true, maxTextboxLength, true, true));
-    html.append(htmlFields(efd, "_PQTY", "_PQTY", true, maxTextboxLength, true, true));
-    html.append(htmlFields(efd, "_PUOM", "_PUOM", true, maxTextboxLength, true, true));
-    html.append(htmlFields(efd, "_QTY", "_QTY", true, maxTextboxLength, true, true));
-    html.append(htmlFields(efd, "_UOM", "_UOM", true, maxTextboxLength, true, true));
-
-    html.append("<a href=\"#\"");
-    html.append("onClick=\"" + searchsCommand(efd, true, vecFields, conn) + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img width=\"").append(IMAGE_EDITION_WIDTH)
-        .append("\" height=\"").append(IMAGE_EDITION_HEIGHT).append("\" alt=\"").append(efd.name)
-        .append("\" title=\"").append(efd.name).append("\"");
-    html.append(" border=\"0\" src=\"../../../../../web/images/"
-        + FormatUtilities.replace(efd.searchname.trim()) + ".jpg\" id=\"button"
-        + FormatUtilities.replace(efd.searchname.trim()) + "\"></a>");
-    return html.toString();
-  }
 }
--- a/src-wad/src/org/openbravo/wad/WadUtility.java	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/WadUtility.java	Thu Feb 11 12:10:47 2010 +0100
@@ -53,180 +53,13 @@
     PropertyConfigurator.configure("log4j.lcf");
   }
 
-  public static String columnIdentifier(ConnectionProvider conn, String tableName,
-      boolean required, FieldsData fields, int ilist, int itable, boolean translated,
-      Vector<Object> vecFields, Vector<Object> vecTable, Vector<Object> vecWhere,
-      Vector<Object> vecParameters, Vector<Object> vecTableParameters, String sqlDateFormat)
-      throws ServletException {
-    if (fields == null)
-      return "";
-    StringBuffer texto = new StringBuffer();
-    if (fields.reference.equals("17")) { // List
-      ilist++;
-      if (tableName != null && tableName.length() != 0) {
-        vecTable.addElement("left join ad_ref_list_v list" + ilist + " on (" + tableName + "."
-            + fields.name + " = list" + ilist + ".value and list" + ilist + ".ad_reference_id = '"
-            + fields.referencevalue + "' and list" + ilist + ".ad_language = ?) ");
-        vecTableParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-      } else {
-        vecTable.addElement("ad_ref_list_v list" + ilist);
-        vecWhere.addElement(fields.referencevalue + " = " + "list" + ilist + ".ad_reference_id");
-        vecWhere.addElement("list" + ilist + ".ad_language = ? ");
-        vecParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-      }
-      texto.append("list").append(ilist).append(".name");
-      vecFields.addElement(texto.toString());
-    } else if (fields.reference.equals("18")) { // Table
-      itable++;
-      TableRelationData trd[] = TableRelationData.selectRefTable(conn, fields.referencevalue);
-      if (log4j.isDebugEnabled())
-        log4j.debug(" number of TableRelationData: " + trd.length);
-      vecTable
-          .addElement("left join (select "
-              + trd[0].keyname
-              + ((trd[0].isvaluedisplayed.equals("Y") && !trd[0].keyname.equalsIgnoreCase("value")) ? ", value"
-                  : "")
-              + (!trd[0].keyname.equalsIgnoreCase(trd[0].name) ? (", " + trd[0].name) : "")
-              + " from " + trd[0].tablename + ") table" + itable + " on (" + tableName + "."
-              + fields.name + " = table" + itable + "." + trd[0].keyname + ") ");
-      FieldsData fieldsAux = new FieldsData();
-      fieldsAux.name = trd[0].name;
-      fieldsAux.tablename = trd[0].tablename;
-      fieldsAux.reference = trd[0].reference;
-      fieldsAux.referencevalue = trd[0].referencevalue;
-      fieldsAux.required = trd[0].required;
-      fieldsAux.istranslated = trd[0].istranslated;
-      if (trd[0].isvaluedisplayed.equals("Y"))
-        texto.append("table" + itable + ".value || ' - ' || ");
-      texto.append(columnIdentifier(conn, "table" + itable, required, fieldsAux, ilist, itable,
-          translated, vecFields, vecTable, vecWhere, vecParameters, vecTableParameters,
-          sqlDateFormat));
-    } else if (fields.reference.equals("19")) { // TableDir
-      itable++;
-      int ilength = fields.name.length();
-      String tableDirName = fields.name.substring(0, ilength - 3);
-      FieldsData fdi[] = FieldsData.identifierColumns(conn, tableDirName);
-      vecTable.addElement("left join " + tableDirName + " on (" + tableName + "." + fields.name
-          + " = " + tableDirName + "." + fields.name + ") ");
-      for (int i = 0; i < fdi.length; i++) {
-        if (i > 0)
-          texto.append(" || ' - ' || ");
-        texto.append(columnIdentifier(conn, tableDirName, required, fdi[i], ilist, itable,
-            translated, vecFields, vecTable, vecWhere, vecParameters, vecTableParameters,
-            sqlDateFormat));
-      }
-    } else if (fields.reference.equals("30")) {
-      itable++;
-      EditionFieldsData[] dataSearchs = EditionFieldsData.selectSearchs(conn, "",
-          fields.referencevalue);
-      String tableDirName = "", fieldId = "";
-      if (dataSearchs == null || dataSearchs.length == 0) {
-        int ilength = fields.name.length();
-        if (fields.reference.equals("25"))
-          tableDirName = "C_ValidCombination";
-        else if (fields.reference.equals("31"))
-          tableDirName = "M_Locator";
-        else if (fields.reference.equals("800011"))
-          tableDirName = "M_Product";
-        else
-          tableDirName = fields.name.substring(0, ilength - 3);
-        if (fields.reference.equals("25"))
-          fieldId = "C_ValidCombination_ID";
-        else if (fields.reference.equals("31"))
-          fieldId = "M_Locator_ID";
-        else if (fields.reference.equals("800011"))
-          fieldId = "M_Product_ID";
-        else
-          fieldId = fields.name;
-      } else {
-        tableDirName = dataSearchs[0].reference;
-        fieldId = dataSearchs[0].columnname;
-      }
-      FieldsData fdi[] = FieldsData.identifierColumns(conn, tableDirName);
-      vecTable.addElement("left join " + tableDirName + " on (" + tableName + "." + fields.name
-          + " = " + tableDirName + "." + fieldId + ")");
-      for (int i = 0; i < fdi.length; i++) {
-        if (i > 0)
-          texto.append(" || ' - ' || ");
-        texto.append(columnIdentifier(conn, tableDirName, required, fdi[i], ilist, itable,
-            translated, vecFields, vecTable, vecWhere, vecParameters, vecTableParameters,
-            sqlDateFormat));
-      }
-    } else if (fields.reference.equals("31") || fields.reference.equals("35")
-        || fields.reference.equals("25") || fields.reference.equals("800011")) { // Search y Locator
-      itable++;
-      int ilength = fields.name.length();
-      String tableDirName = "";
-      if (fields.reference.equals("25"))
-        tableDirName = "C_ValidCombination";
-      else if (fields.reference.equals("31"))
-        tableDirName = "M_Locator";
-      else if (fields.reference.equals("35"))
-        tableDirName = "M_AttributeSetInstance";
-      else if (fields.reference.equals("800011"))
-        tableDirName = "M_Product";
-      else
-        tableDirName = fields.name.substring(0, ilength - 3);
-      String fieldId = "";
-      if (fields.reference.equals("25"))
-        fieldId = "C_ValidCombination_ID";
-      else if (fields.reference.equals("31"))
-        fieldId = "M_Locator_ID";
-      else if (fields.reference.equals("35"))
-        fieldId = "M_AttributeSetInstance_ID";
-      else if (fields.reference.equals("800011"))
-        fieldId = "M_Product_ID";
-      else
-        fieldId = fields.name;
-      FieldsData fdi[] = FieldsData.identifierColumns(conn, tableDirName);
-      vecTable.addElement("left join " + tableDirName + " on (" + tableName + "." + fields.name
-          + " = " + tableDirName + "." + fieldId + ")");
-      for (int i = 0; i < fdi.length; i++) {
-        if (i > 0)
-          texto.append(" || ' - ' || ");
-        texto.append(columnIdentifier(conn, tableDirName, required, fdi[i], ilist, itable,
-            translated, vecFields, vecTable, vecWhere, vecParameters, vecTableParameters,
-            sqlDateFormat));
-      }
-    } else {
-      if (fields.istranslated.equals("Y")
-          && TableRelationData.existsTableColumn(conn, fields.tablename + "_TRL", fields.name)) {
-        FieldsData fdi[] = FieldsData.tableKeyColumnName(conn, fields.tablename);
-        if (fdi == null || fdi.length == 0) {
-          vecFields.addElement(applyFormat(tableName + "." + fields.name, fields.reference,
-              sqlDateFormat));
-          texto.append(applyFormat(tableName + "." + fields.name, fields.reference, sqlDateFormat));
-        } else {
-          vecTable.addElement("left join (select " + fdi[0].name + ", AD_Language"
-              + (!fdi[0].name.equalsIgnoreCase(fields.name) ? (", " + fields.name) : "") + " from "
-              + fields.tablename + "_TRL) tableTRL" + itable + " on (" + tableName + "."
-              + fdi[0].name + " = tableTRL" + itable + "." + fdi[0].name + " and tableTRL" + itable
-              + ".AD_Language = ?) ");
-          vecTableParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-          vecFields.addElement(applyFormat("(CASE WHEN tableTRL" + itable + "." + fields.name
-              + " IS NULL THEN TO_CHAR(" + tableName + "." + fields.name
-              + ") ELSE TO_CHAR(tableTRL" + itable + "." + fields.name + ") END)",
-              fields.reference, sqlDateFormat));
-          texto.append(applyFormat("(CASE WHEN tableTRL" + itable + "." + fields.name
-              + " IS NULL THEN TO_CHAR(" + tableName + "." + fields.name
-              + ") ELSE TO_CHAR(tableTRL" + itable + "." + fields.name + ") END)",
-              fields.reference, sqlDateFormat));
-        }
-      } else {
-        vecFields.addElement(applyFormat(tableName + "." + fields.name, fields.reference,
-            sqlDateFormat));
-        texto.append(applyFormat(tableName + "." + fields.name, fields.reference, sqlDateFormat));
-      }
-    }
-    return texto.toString();
-  }
-
   public static String applyFormat(String text, String reference, String sqlDateFormat) {
-    if (isDateField(reference))
+    // used from WADControl column identifier, keep hardcoded for core references
+    if (reference.equals("15"))
       return "TO_CHAR(" + text + ", '" + sqlDateFormat + "')";
-    else if (isTimeField(reference))
+    else if (reference.equals("24"))
       return "TO_CHAR(" + text + ", 'HH24:MM:SS')";
-    else if (isDateTimeField(reference))
+    else if (reference.equals("16"))
       return "TO_CHAR(" + text + ", '" + sqlDateFormat + " HH24:MM:SS')";
     else
       text = "TO_CHAR(COALESCE(TO_CHAR(" + text + "), ''))";
@@ -240,96 +73,17 @@
       throws ServletException {
     if (fields == null)
       return "";
-    StringBuffer texto = new StringBuffer();
-    int ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
-    int itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
-    if (fields.reference.equals("13")) { // ID
-      FieldsData fdi[] = FieldsData.identifierColumns(conn, tableName);
-      for (int i = 0; i < fdi.length; i++) {
-        if (i > 0)
-          texto.append(" || ' - ' || ");
-        vecCounters.set(0, Integer.toString(itable));
-        vecCounters.set(1, Integer.toString(ilist));
-        texto.append(columnIdentifier(conn, tableName, required, fdi[i], vecCounters, translated,
-            vecFields, vecTable, vecWhere, vecParameters, vecTableParameters, sqlDateFormat));
-        ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
-        itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
-      }
-      if (texto.toString().equals("")) {
-        vecFields.addElement(((tableName != null && tableName.length() != 0) ? (tableName + ".")
-            : "")
-            + fields.name);
-        texto.append(((tableName != null && tableName.length() != 0) ? (tableName + ".") : "")
-            + fields.name);
-      }
-    } else if (fields.reference.equals("17")) { // List
-      ilist++;
-      if (tableName != null && tableName.length() != 0) {
-        vecTable.addElement("left join ad_ref_list_v list" + ilist + " on (" + tableName + "."
-            + fields.name + " = list" + ilist + ".value and list" + ilist + ".ad_reference_id = '"
-            + fields.referencevalue + "' and list" + ilist + ".ad_language = ?) ");
-        vecTableParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-      } else {
-        vecTable.addElement("ad_ref_list_v list" + ilist);
-        vecWhere.addElement(fields.referencevalue + " = " + "list" + ilist + ".ad_reference_id ");
-        vecWhere.addElement("list" + ilist + ".ad_language = ? ");
-        vecParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-      }
-      texto.append("list").append(ilist).append(".name");
-      vecFields.addElement(texto.toString());
-      vecCounters.set(0, Integer.toString(itable));
-      vecCounters.set(1, Integer.toString(ilist));
-    } else if (fields.reference.equals("18")) { // Table
-      itable++;
-      TableRelationData trd[] = TableRelationData.selectRefTable(conn, fields.referencevalue);
-      if (log4j.isDebugEnabled())
-        log4j.debug(" number of TableRelationData: " + trd.length);
 
-      if (tableName != null && tableName.length() != 0) {
-        vecTable
-            .addElement("left join (select "
-                + trd[0].keyname
-                + ((trd[0].isvaluedisplayed.equals("Y") && !trd[0].keyname
-                    .equalsIgnoreCase("value")) ? ", value" : "")
-                + (!trd[0].keyname.equalsIgnoreCase(trd[0].name) ? (", " + trd[0].name) : "")
-                + " from " + trd[0].tablename + ") table" + itable + " on (" + tableName + "."
-                + fields.name + " = " + " table" + itable + "." + trd[0].keyname + ")");
-      } else {
-        vecTable.addElement(trd[0].tablename + " table" + itable);
-      }
-      FieldsData fieldsAux = new FieldsData();
-      fieldsAux.name = trd[0].name;
-      fieldsAux.tablename = trd[0].tablename;
-      fieldsAux.reference = trd[0].reference;
-      fieldsAux.referencevalue = trd[0].referencevalue;
-      fieldsAux.required = trd[0].required;
-      fieldsAux.istranslated = trd[0].istranslated;
-      vecCounters.set(0, Integer.toString(itable));
-      vecCounters.set(1, Integer.toString(ilist));
-      if (trd[0].isvaluedisplayed.equals("Y"))
-        texto.append("table" + itable + ".value || ' - ' || ");
-      texto.append(columnIdentifier(conn, "table" + itable, required, fieldsAux, vecCounters,
-          translated, vecFields, vecTable, vecWhere, vecParameters, vecTableParameters,
-          sqlDateFormat));
-      ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
-      itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
-    } else if (fields.reference.equals("32")) { // Image
-      ilist++;
-      if (tableName != null && tableName.length() != 0) {
-        vecTable.addElement("left join (select AD_Image_ID, ImageURL from AD_Image) list" + ilist
-            + " on (" + tableName + "." + fields.name + " = list" + ilist + ".AD_Image_ID) ");
-      } else {
-        vecTable.addElement("AD_Image list" + ilist);
-      }
-      texto.append("list").append(ilist).append(".ImageURL");
-      vecFields.addElement(texto.toString());
-      vecCounters.set(0, Integer.toString(itable));
-      vecCounters.set(1, Integer.toString(ilist));
-    } else if (fields.reference.equals("19") || fields.reference.equals("30")
+    if (fields.reference.equals("19") || fields.reference.equals("30")
         || fields.reference.equals("31") || fields.reference.equals("35")
-        || fields.reference.equals("25") || fields.reference.equals("800011")) { // TableDir, Search
-      // y
-      // Locator
+        || fields.reference.equals("25") || fields.reference.equals("800011")) {
+      // TableDir, Search and Locator
+      // Maintain this old code for convenience, rest of code moved to WADControl subclasses
+
+      StringBuffer texto = new StringBuffer();
+      int ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
+      int itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
+
       itable++;
       EditionFieldsData[] dataSearchs = null;
       if (fields.reference.equals("30"))
@@ -394,99 +148,16 @@
         ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
         itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
       }
+      vecCounters.set(0, Integer.toString(itable));
+      vecCounters.set(1, Integer.toString(ilist));
+      return texto.toString();
     } else {
-      if (fields.istranslated.equals("Y")
-          && TableRelationData.existsTableColumn(conn, fields.tablename + "_TRL", fields.name)) {
-        FieldsData fdi[] = FieldsData.tableKeyColumnName(conn, fields.tablename);
-        if (fdi == null || fdi.length == 0) {
-          vecFields.addElement(applyFormat(
-              ((tableName != null && tableName.length() != 0) ? (tableName + ".") : "")
-                  + fields.name, fields.reference, sqlDateFormat));
-          texto.append(applyFormat(
-              ((tableName != null && tableName.length() != 0) ? (tableName + ".") : "")
-                  + fields.name, fields.reference, sqlDateFormat));
-        } else {
-          vecTable.addElement("left join (select " + fdi[0].name + ",AD_Language"
-              + (!fdi[0].name.equalsIgnoreCase(fields.name) ? (", " + fields.name) : "") + " from "
-              + fields.tablename + "_TRL) tableTRL" + itable + " on (" + tableName + "."
-              + fdi[0].name + " = tableTRL" + itable + "." + fdi[0].name + " and tableTRL" + itable
-              + ".AD_Language = ?) ");
-          vecTableParameters.addElement("<Parameter name=\"paramLanguage\"/>");
-          vecFields.addElement(applyFormat("(CASE WHEN tableTRL" + itable + "." + fields.name
-              + " IS NULL THEN TO_CHAR(" + tableName + "." + fields.name
-              + ") ELSE TO_CHAR(tableTRL" + itable + "." + fields.name + ") END)",
-              fields.reference, sqlDateFormat));
-          texto.append(applyFormat("(CASE WHEN tableTRL" + itable + "." + fields.name
-              + " IS NULL THEN TO_CHAR(" + tableName + "." + fields.name
-              + ") ELSE TO_CHAR(tableTRL" + itable + "." + fields.name + ") END)",
-              fields.reference, sqlDateFormat));
-        }
-      } else {
-        vecFields
-            .addElement(applyFormat(
-                ((tableName != null && tableName.length() != 0) ? (tableName + ".") : "")
-                    + fields.name, fields.reference, sqlDateFormat));
-        texto
-            .append(applyFormat(((tableName != null && tableName.length() != 0) ? (tableName + ".")
-                : "")
-                + fields.name, fields.reference, sqlDateFormat));
-      }
+      WADControl control = WadUtility.getWadControlClass(conn, fields.reference,
+          fields.adReferenceValueId);
+      return control.columnIdentifier(tableName, fields, vecCounters, vecFields, vecTable,
+          vecWhere, vecParameters, vecTableParameters);
     }
-    vecCounters.set(0, Integer.toString(itable));
-    vecCounters.set(1, Integer.toString(ilist));
-    return texto.toString();
-  }
 
-  /**
-   * Establece el tipo de class que le corresponde a un campo determinado de la edición
-   * 
-   * @param efd
-   *          - Estructura de tipo EditionFieldsData
-   * @return Devuelve un String con el parámetro class completo o un String vacío en caso de no
-   *         tener class asociado para el campo indicado.
-   */
-  public static String classRequiredUpdateable(EditionFieldsData efd, boolean isupdateable,
-      boolean tabIsReadOnly) {
-    StringBuffer htmltext = new StringBuffer();
-    String strAux = "";
-    try {
-      if (isDecimalNumber(efd.reference) || isPriceNumber(efd.reference)
-          || isIntegerNumber(efd.reference) || isGeneralNumber(efd.reference)
-          || isQtyNumber(efd.reference)) {
-        strAux = " number";
-      }
-      String strType = "dojoValidateValid";
-      String classType = "TextBox";
-      if (isSelectType(efd.reference)) {
-        strType = "Combo";
-        classType = "Combo";
-      }
-
-      if (efd.required.equals("Y") && !efd.columnname.equalsIgnoreCase("Value")) {
-        if (efd.isreadonly.equals("Y") || tabIsReadOnly) {
-          htmltext.append(" class=\"").append(strType).append(" required ").append(classType)
-              .append("_OneCell_width").append(strAux).append(" readonly\" ");
-        } else if (!isupdateable) {
-          htmltext.append(" class=\"").append(strType).append(" required ").append(classType)
-              .append("_OneCell_width").append(strAux).append(" readonly\" ");
-        } else {
-          htmltext.append(" class=\"").append(strType).append(" required ").append(classType)
-              .append("_OneCell_width").append(strAux).append("\" ");
-        }
-      } else if (efd.isreadonly.equals("Y") || tabIsReadOnly) {
-        htmltext.append(" class=\"").append(strType).append(" ").append(classType).append(
-            "_OneCell_width").append(strAux).append(" readonly\" ");
-      } else if (!isupdateable) {
-        htmltext.append(" class=\"").append(strType).append(" ").append(classType).append(
-            "_OneCell_width").append(strAux).append(" readonly\" ");
-      } else {
-        htmltext.append(" class=\"").append(strType).append(" ").append(classType).append(
-            "_OneCell_width").append(strAux).append("\" ");
-      }
-    } catch (Exception e) {
-      return "";
-    }
-    return htmltext.toString();
   }
 
   public static String buildSQL(String clause, Vector<Object> vecParameters) {
@@ -501,482 +172,23 @@
     return where.toString();
   }
 
-  public static String columnRelationType(String reference) {
-    if (isDateField(reference))
-      return "DATE";
-    else if (isTimeField(reference))
-      return "TIME";
-    else if (isDateTimeField(reference))
-      return "DATETIME";
-    else if (reference.equals("20"))
-      return "YN";
-    else if (isDecimalNumber(reference))
-      return "DECIMAL";
-    else if (isQtyNumber(reference))
-      return "DECIMAL";
-    else if (isPriceNumber(reference))
-      return "DECIMAL";
-    else if (isIntegerNumber(reference))
-      return "INTEGER";
-    else if (isGeneralNumber(reference))
-      return "NUMBER";
-    else if (reference.equals("32"))
-      return "IMAGE";
-    else if (isLinkType(reference))
-      return "LINK";
-    else
-      return "TEXT";
-  }
-
-  public static boolean columnRelationFormat(FieldsData data, boolean header, int maxColSize)
-      throws IOException, ServletException {
-    if (data == null)
-      return false;
-    if (data.reference.equals("28"))
-      return false;
-    if (maxColSize > 0) {
-      if (Integer.valueOf(data.displaylength).intValue() > maxColSize)
-        data.displaylength = Integer.toString(maxColSize);
-      if (header && data.name.length() > Integer.valueOf(data.displaylength).intValue()) {
-        data.name = data.name.substring(0, Integer.valueOf(data.displaylength).intValue());
-      }
-    }
-    return true;
-  }
-
-  public static void xmlFormatAttribute(FieldsData data) {
-    if (data == null)
-      return;
-    if (data.isdisplayed.equals("Y")) {
-      if (isIntegerNumber(data.reference))
-        data.xmlFormat = "INTEGER";
-      else if (isDecimalNumber(data.reference))
-        data.xmlFormat = "EURO";
-      else if (isQtyNumber(data.reference))
-        data.xmlFormat = "QTY";
-      else if (isPriceNumber(data.reference))
-        data.xmlFormat = "PRICE";
-      else if (isGeneralNumber(data.reference))
-        data.xmlFormat = "GENERALQTY";
-      else
-        data.xmlFormat = "REPLACECHARACTERS";
-    }
-  }
-
-  public static String xmlFields(FieldsData fd, String completeName, int maxTextboxLength,
-      boolean forcedAttribute, boolean tabIsReadOnly) {
-    StringBuffer html = new StringBuffer();
-    String strSystemSeparator = System.getProperty("file.separator");
-
-    if (forcedAttribute) {
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      html.append("attribute=\"value\"");
-      if (isDecimalNumber(fd.reference))
-        html.append(" format=\"euroEdition\"");
-      else if (isQtyNumber(fd.reference))
-        html.append(" format=\"qtyEdition\"");
-      else if (isPriceNumber(fd.reference))
-        html.append(" format=\"priceEdition\"");
-      else if (isIntegerNumber(fd.reference))
-        html.append(" format=\"integerEdition\"");
-      else if (isGeneralNumber(fd.reference))
-        html.append(" format=\"generalQtyEdition\"");
-      else
-        html.append(" replaceCharacters=\"htmlPreformated\"");
-      html.append(">");
-      html.append(fd.name + completeName + "</FIELD>");
-    } else if (fd.reference.equals("17") || fd.reference.equals("18") || fd.reference.equals("19")) { // List
-      html.append(xmlFields(fd, completeName, maxTextboxLength, true, tabIsReadOnly));
-      if (fd.isdisplayed.equals("Y")) {
-        html.append("\n<SUBREPORT id=\"report" + fd.name + completeName + "\" name=\"report"
-            + fd.name + completeName + "\"");
-        html.append(" report=\"org" + strSystemSeparator + "openbravo" + strSystemSeparator
-            + "erpCommon" + strSystemSeparator + "reference" + strSystemSeparator + "List\">\n");
-        html.append("  <ARGUMENT name=\"parameterListSelected\" withId=\"" + fd.name + completeName
-            + "\"/>\n");
-        html.append("</SUBREPORT>\n");
-      }
-      if (fd.isreadonly.equals("Y") || !fd.isupdateable.equals("Y") || tabIsReadOnly) {
-        html.append("<FIELD ");
-        html.append("id=\"report" + fd.name + completeName + "_S\" ");
-        html.append(" attribute=\"onchange\" replace=\"xx\"");
-        html.append(">");
-        html.append(fd.name + completeName + "</FIELD>");
-      }
-    } else if (fd.reference.equals("32")) { // Image
-      html.append(xmlFields(fd, "", maxTextboxLength, true, tabIsReadOnly));
-      if (fd.isdisplayed.equals("Y")) {
-        html.append("<FIELD id=\"" + fd.name + completeName + "\" name=\"" + fd.name + completeName
-            + "\" attribute=\"src\" replace=\"xx\">");
-        html.append(fd.name).append(completeName);
-        html.append("</FIELD>");
-      }
-    } else if (isLinkType(fd.reference)) {
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      html.append("attribute=\"value\"");
-      html.append(" replaceCharacters=\"htmlPreformated\"");
-      html.append(">");
-      html.append(fd.name + completeName + "</FIELD>");
-    } else if (fd.reference.equals("20") && fd.isdisplayed.equals("Y")) { // YesNo
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      html.append("boolean=\"checked\" withId=\"paramCheck\"");
-      html.append(">");
-      html.append(fd.name + completeName + "</FIELD>");
-    } else if (fd.reference.equals("28") && fd.isdisplayed.equals("Y")
-        && !fd.referencevalue.equals("") && !fd.columnname.equals("ChangeProjectStatus")) { // Button
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      html.append("replaceCharacters=\"htmlPreformated\" ");
-      html.append(" attribute=\"value\">");
-      html.append(fd.name + completeName + "</FIELD>");
-      html.append("<FIELD ");
-      html.append("replaceCharacters=\"htmlPreformated\" ");
-      html.append("id=\"" + fd.name + completeName + "_BTN\">");
-      html.append(fd.name + completeName + "_BTN</FIELD>");
-    } else if (Integer.valueOf(fd.fieldlength).intValue() > maxTextboxLength
-        && fd.isdisplayed.equals("Y")) {
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      if (isDecimalNumber(fd.reference))
-        html.append(" format=\"euroEdition\"");
-      else if (isQtyNumber(fd.reference))
-        html.append(" format=\"qtyEdition\"");
-      else if (isPriceNumber(fd.reference))
-        html.append(" format=\"priceEdition\"");
-      else if (isIntegerNumber(fd.reference))
-        html.append(" format=\"integerEdition\"");
-      else if (isGeneralNumber(fd.reference))
-        html.append(" format=\"generalQtyEdition\"");
-      else
-        html.append(" replaceCharacters=\"htmlPreformatedTextarea\"");
-      html.append(">");
-      html.append(fd.name + completeName + "</FIELD>");
-    } else {
-      html.append("<FIELD ");
-      html.append("id=\"" + fd.name + completeName + "\" ");
-      html.append("attribute=\"value\"");
-      if (isDecimalNumber(fd.reference))
-        html.append(" format=\"euroEdition\"");
-      else if (isQtyNumber(fd.reference))
-        html.append(" format=\"qtyEdition\"");
-      else if (isPriceNumber(fd.reference))
-        html.append(" format=\"priceEdition\"");
-      else if (isIntegerNumber(fd.reference))
-        html.append(" format=\"integerEdition\"");
-      else if (isGeneralNumber(fd.reference))
-        html.append(" format=\"generalQtyEdition\"");
-      else
-        html.append(" replaceCharacters=\"htmlPreformated\"");
-      html.append(">");
-      html.append(fd.name + completeName + "</FIELD>");
-    }
-
-    return html.toString();
-  }
-
-  public static String htmlFields(EditionFieldsData efd, String completeName, String completeID,
-      boolean isupdateable, int maxTextboxLength, boolean forcedAttribute, boolean isdesigne,
-      Vector<Object> vecCallOuts, String tabName, Vector<Object> vecDisplayLogic,
-      Vector<Object> vecReloads, boolean tabIsReadOnly, int textareaLength) {
-    StringBuffer html = new StringBuffer();
-    String onChange = ((isInVector(vecDisplayLogic, efd.columnname) && !tabIsReadOnly) ? "displayLogic();"
-        : "");
-    String logChanges = "logChanges(this);";
-    if (vecReloads != null && vecReloads.size() > 0 && efd.calloutname.equals("") && !tabIsReadOnly
-        && isInVector(vecReloads, efd.columnname)) {
-      efd.calloutname = "ComboReloads" + efd.tabid;
-      onChange += callouts(efd, vecCallOuts, maxTextboxLength, true);
-      // efd.callout="";
-    }
-    if (!forcedAttribute && efd.isdisplayed.equals("Y") && !efd.displaylogic.equals("")) {
-      html.append("<span id=\"" + efd.columnname + "_inp\">");
-    }
-    if (forcedAttribute) {
-      html.append("<input type=\"hidden\"");
-      html.append(" name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp) + completeName);
-      html.append("\" id=\"" + efd.columnname + completeID + "\" value=\"");
-      if (!isdesigne)
-        html.append("xxV");
-      if (isDecimalNumber(efd.reference) || isPriceNumber(efd.reference)
-          || isGeneralNumber(efd.reference) || isQtyNumber(efd.reference))
-        html.append("\" onkeydown=\"autoCompleteNumber(this, true, true, event);return true;");
-      else if (isIntegerNumber(efd.reference))
-        html.append("\" onkeydown=\"autoCompleteNumber(this, false, true, event);return true;");
-      html.append("\"");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      html.append(" ></input>");
-    } else if ((efd.reference.equals("17") || efd.reference.equals("18") || efd.reference
-        .equals("19"))
-        && efd.isdisplayed.equals("Y")) { // List or Table or TableDir
-      StringBuffer html1 = new StringBuffer();
-      html.append("<select name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-          + completeName + "\"");
-      onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      // if (efd.isparent.equals("Y") || !isupdateable || tabIsReadOnly) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("column: " + efd.columnname + "isUpdateable: " + isupdateable
-            + " tabReadOnly: " + tabIsReadOnly + " isUpdateable field: " + efd.isupdateable);
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-        onChange = "selectCombo(this, 'xx');";
-      }
-      html.append(" onchange=\"").append(logChanges).append(onChange).append("return true;\"");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      html.append(" id=\"report");
-      html.append(efd.columnname + completeID + "_S\"");
-      html.append(">");
-      if (!efd.required.equals("Y"))
-        html.append("<option value=\"\"></option>");
-      html.append("<div id=\"report");
-      html.append(efd.columnname + completeID + "\"></div>");
-      html.append("</select>");
-      html.append(html1);
-    } else if (efd.reference.equals("23")) {
-      html.append("<input type=\"file\" ");
-      html.append(" size=\"" + efd.displaysize + "\" ");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      html.append(" name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp) + completeName);
-      html.append("\" id=\"" + efd.columnname + completeID + "\" ");
-      html.append("value=\"");
-      if (!isdesigne)
-        html.append("xxV");
-      html.append("\"");
-      if (!tabIsReadOnly)
-        onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      if (!onChange.equals(""))
-        onChange = onChange + "return true;";
-      html.append(" onchange=\"").append(logChanges).append(onChange).append("\"");
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append("></input>");
-    } else if (efd.reference.equals("32")) {
-      if (!tabIsReadOnly && isupdateable) {
-        html.append("<a href=\"#\" onclick=\"");
-        html.append("openSearch(null, null, '../info/ImageInfo.html', null, false, 'frmMain', 'inp"
-            + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "', 'inp"
-            + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "_R', document.frmMain.inp"
-            + Sqlc.TransformaNombreColumna(efd.columnnameinp) + ".value);");
-        html.append("return false;\" onmouseover=\"window.status='").append(efd.referenceName)
-            .append("';return true;\" onmouseout=\"window.status='';return true;\">");
-      }
-      html.append("<img src=\"../../../../../web/images/xx\" border=\"0\"");
-      html.append(" width=\"").append(
-          (efd.displaysize.equals("") || IMAGE_EDITION_WIDTH < Integer.valueOf(efd.displaysize)
-              .intValue()) ? Integer.toString(IMAGE_EDITION_WIDTH) : efd.displaysize).append("\"");
-      html.append(" height=\"").append(
-          (efd.displaysize.equals("") || IMAGE_EDITION_HEIGHT < Integer.valueOf(efd.displaysize)
-              .intValue()) ? Integer.toString(IMAGE_EDITION_HEIGHT) : efd.displaysize)
-          .append("\" ");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      html.append(" name=\"inp").append(Sqlc.TransformaNombreColumna(efd.columnnameinp)).append(
-          completeName);
-      html.append("\" id=\"").append(efd.columnname).append(completeID).append("\" alt=\"").append(
-          efd.name).append("\" title=\"").append(efd.name).append("\"");
-      if (!tabIsReadOnly)
-        onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      if (!onChange.equals(""))
-        onChange = onChange + "return true;";
-      html.append(" onchange=\"").append(logChanges).append(onChange).append("\"");
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append("></img>");
-      if (!tabIsReadOnly && isupdateable) {
-        html.append("</a>");
-      }
-    } else if (efd.reference.equals("34") && efd.isdisplayed.equals("Y")) { // MEMO
-      StringBuffer html1 = new StringBuffer();
-      double rowLength = ((Integer.valueOf(efd.fieldlength).intValue() * 20) / 4000);
-      if (rowLength < 3.0)
-        rowLength = 3.0;
-      html.append("<textarea cols=\"").append(textareaLength).append("\" rows=\"").append(
-          Double.toString(rowLength)).append("\" name=\"inp").append(
-          Sqlc.TransformaNombreColumna(efd.columnnameinp));
-      html.append(completeName).append("\" id=\"").append(efd.columnname).append(completeID)
-          .append("\" ");
-      onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      html.append(" onclick=\"").append(logChanges).append(onChange).append("return true;\"");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append(" onkeypress=\"return handleFieldMaxLength(this, ").append(efd.fieldlength)
-          .append(");").append("\"");
-      html.append(">");
-      if (!isdesigne)
-        html.append("xxV");
-      html.append("</textarea>");
-      html.append(html1);
-    } else if (isLinkType(efd.reference)) {
-      html.append("<input type=\"text\" name=\"inp").append(
-          Sqlc.TransformaNombreColumna(efd.columnnameinp));
-      html.append(completeName).append("\" id=\"").append(efd.columnname).append(completeID)
-          .append("\" ");
-      onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      html.append(" onchange=\"").append(logChanges).append(onChange).append("return true;\"");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append(" size=\"").append(efd.displaysize).append("\" ");
-      html.append(" maxlength=\"").append(efd.fieldlength).append("\" ");
-      html.append("value=\"");
-      if (!isdesigne)
-        html.append("xxV");
-      html.append("\">");
-    } else if (!efd.reference.equals("20")
-        && (Integer.valueOf(efd.fieldlength).intValue() > maxTextboxLength)
-        && efd.isdisplayed.equals("Y")) { // TEXTAREA
-      StringBuffer html1 = new StringBuffer();
-      double rowLength = ((Integer.valueOf(efd.fieldlength).intValue() * 20) / 4000);
-      if (rowLength < 3.0)
-        rowLength = 3.0;
-      html.append("<textarea cols=\"").append(textareaLength).append("\" rows=\"").append(
-          Double.toString(rowLength)).append("\" name=\"inp").append(
-          Sqlc.TransformaNombreColumna(efd.columnnameinp));
-      html.append(completeName).append("\" id=\"").append(efd.columnname).append(completeID)
-          .append("\" ");
-      onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      html.append(" onclick=\"").append(logChanges).append(onChange).append("return true;\"");
-      html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append(" onkeypress=\"return handleFieldMaxLength(this, ").append(efd.fieldlength)
-          .append(");").append("\"");
-      html.append(">");
-      if (!isdesigne)
-        html.append("xxV");
-      html.append("</textarea>");
-      html.append(html1);
-    } else if (efd.reference.equals("28") && efd.isdisplayed.equals("Y")) {
-      html
-          .append("<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\" class=\"ActionButton\" onClick=\"");
-      html.append(buttonsCommand(efd, tabName + "_Edition.html") + "\">");
-      html.append("<tr class=\"ActionButton\"><td>");
-      html
-          .append("<img src=\"../../../../../web/images/ButtonProcess.gif\" border=\"0\" height=\"25\" width=\"25\" id=\"buttonProcess\"></td>");
-      html.append("<td class=\"Medio\">");
-      html.append(htmlFields(efd, completeName, completeID, isupdateable, maxTextboxLength, true,
-          isdesigne, vecCallOuts, tabName, vecDisplayLogic, vecReloads, tabIsReadOnly,
-          textareaLength));
-      html.append("<span id=\"" + efd.columnname + completeID + "_BTN\">");
-      html
-          .append((efd.referencevalue.equals("") || efd.columnname.equals("ChangeProjectStatus")) ? efd.name
-              : "xx");
-      html.append("</span>&nbsp;</td>");
-      html.append("</tr></table>");
-    } else {
-      StringBuffer html1 = new StringBuffer();
-      html.append("<input type=\"");
-      if (efd.isdisplayed.equals("N")) {
-        html.append("hidden\"");
-      } else if (efd.reference.equals("20")) { // YesNo
-        html.append("checkbox\"");
-      } else {
-        if (efd.isencrypted.equals("Y") || efd.iscolumnencrypted.equals("Y"))
-          html.append("password\"");
-        else
-          html.append("text\"");
-        if (isDecimalNumber(efd.reference) || isPriceNumber(efd.reference)
-            || isGeneralNumber(efd.reference) || isQtyNumber(efd.reference))
-          html.append(" onkeydown=\"autoCompleteNumber(this, true, true, event);return true;\"");
-        else if (isIntegerNumber(efd.reference))
-          html.append(" onkeydown=\"autoCompleteNumber(this, false, true, event);return true;\"");
-        html.append(" size=\"" + efd.displaysize + "\" ");
-        html.append(classRequiredUpdateable(efd, isupdateable, tabIsReadOnly));
-        if (!isSearchType(efd.reference))
-          html.append(" maxlength=\"" + efd.fieldlength + "\"");
-      }
-      html.append(" name=\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp) + completeName);
-      html.append("\" id=\"" + efd.columnname + completeID + "\" ");
-      html.append("value=\"");
-      if (efd.isdisplayed.equals("N")) {
-        if (!isdesigne)
-          html.append("xxV");
-      } else if (efd.reference.equals("20")) {
-        html.append("Y");
-      } else {
-        if (!isdesigne)
-          html.append("xxV");
-      }
-      html.append("\"");
-      if (!tabIsReadOnly)
-        onChange = callouts(efd, vecCallOuts, maxTextboxLength) + onChange;
-      onChange = logChanges + onChange + "return true;";
-
-      if (efd.reference.equals("14")
-          && Integer.valueOf(efd.fieldlength).intValue() > maxTextboxLength) {
-        html.append((!onChange.equals("") ? (" onblur=\"" + onChange + "\"") : ""));
-      } else if (efd.reference.equals("20")) {
-        if (!isupdateable || tabIsReadOnly)
-          onChange = "return false;";
-        html.append((!onChange.equals("") ? (" onclick=\"" + onChange + "\"") : ""));
-      } else {
-        html.append((!onChange.equals("") ? (" onchange=\"" + onChange + "\"") : ""));
-      }
-      if (efd.isdisplayed.equals("Y") && isupdateable
-          && (isDateField(efd.reference) || isTimeField(efd.reference))) { // Date.
-        // Put
-        // a
-        // calendar
-        html.append(" onkeyup=\"auto_completar_");
-        if (isDateField(efd.reference))
-          html.append("fecha(this");
-        else
-          html.append("hora(this, true");
-        html.append(");return true;\"");
-      }
-      if (!isupdateable || tabIsReadOnly) {
-        html.append(" readonly=\"true\"");
-      }
-      html.append("></input>");
-      html.append(html1);
-    }
-
-    if (!forcedAttribute && efd.isdisplayed.equals("Y") && !efd.displaylogic.equals("")) {
-      html.append("</span>");
-    }
-
-    return html.toString();
-  }
-
   public static void setLabel(ConnectionProvider conn, WADControl auxControl, boolean isSOTrx,
       String keyName) throws ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("processing WadUtility.setLabel() - field name: " + auxControl.getData("Name"));
     String strTableID = "", strColumnName = "", strTableName = "";
-    if (auxControl.getData("AD_Reference_ID").equals("18")) {
-      strTableID = TableLinkData.tableId(conn, auxControl.getData("AD_Reference_Value_ID"));
-      strColumnName = TableLinkData.columnName(conn, auxControl.getData("AD_Reference_Value_ID"));
-    } else if (auxControl.getData("AD_Reference_ID").equals("19")
-        || auxControl.getData("AD_Reference_ID").equals("30")
-        || auxControl.getData("AD_Reference_ID").equals("800011")) {
-      EditionFieldsData[] dataSearchs = null;
-      if (auxControl.getData("AD_Reference_ID").equals("30"))
-        dataSearchs = EditionFieldsData.selectSearchs(conn, "", auxControl
-            .getData("AD_Reference_Value_ID"));
-      if (auxControl.getData("AD_Reference_ID").equals("800011")) {
-        strTableName = "M_Product";
-        strColumnName = TableLinkData.keyColumnName(conn, strTableName);
-      } else if (dataSearchs != null && dataSearchs.length != 0) {
-        strTableName = dataSearchs[0].reference;
-        strColumnName = dataSearchs[0].columnname;
-      } else {
-        strTableName = auxControl.getData("ColumnNameSearch");
-        strTableName = strTableName.substring(0, (strTableName.length() - 3));
-        strColumnName = TableLinkData.keyColumnName(conn, strTableName);
-      }
-      strTableID = TableLinkData.tableNameId(conn, strTableName);
-    } else {
+
+    boolean linkable = auxControl.isLink();
+    if (!linkable) {
       auxControl.setData("IsLinkable", "N");
       return;
     }
 
+    String columnId = auxControl.getLinkColumnId();
+
+    strTableID = TableLinkData.tableId(conn, columnId);
+    strColumnName = TableLinkData.columnName(conn, columnId);
+
     if ((strTableID.equals("") || strColumnName.equals(""))
         && !(auxControl.getData("ColumnName").equalsIgnoreCase("updatedBy") || auxControl.getData(
             "ColumnName").equalsIgnoreCase("createdBy"))) {
@@ -1006,297 +218,6 @@
     auxControl.setData("ColumnLabelText", strColumnName);
   }
 
-  public static void comboReloadScript(EditionFieldsData efd, Vector<Object> vecCallOuts,
-      Vector<Object> vecReloads, int maxTextboxLength, String strTab) {
-    if (vecReloads == null)
-      return;
-    if (isInVector(vecReloads, efd.columnnameinp)) {
-      if (efd.isdisplayed.equals("Y")
-          && (efd.reference.equals("21") || efd.reference.equals("30")
-              || efd.reference.equals("31") || efd.reference.equals("35")
-              || efd.reference.equals("25") || efd.reference.equals("800011"))
-          && efd.calloutname.equals("")) {
-        efd.calloutname = "ComboReloads" + strTab;
-        callouts(efd, vecCallOuts, maxTextboxLength, true);
-      }
-    }
-  }
-
-  public static String callouts(EditionFieldsData efd, Vector<Object> vecCallOuts,
-      int maxTextboxLength) {
-    return callouts(efd, vecCallOuts, maxTextboxLength, false);
-  }
-
-  public static String callouts(EditionFieldsData efd, Vector<Object> vecCallOuts,
-      int maxTextboxLength, boolean isReload) {
-    StringBuffer html = new StringBuffer();
-    boolean existCallOut = false;
-    if (!efd.calloutname.equals("")) {
-      if (efd.calloutname.startsWith("ComboReload"))
-        isReload = true;
-      String calloutName = FormatUtilities.replace(efd.calloutname);
-      if (efd.reference.equals("30") || efd.reference.equals("31") || efd.reference.equals("35")
-          || efd.reference.equals("25") || efd.reference.equals("800011")) {
-        boolean existDebug = false;
-        int i;
-        for (i = 0; i < vecCallOuts.size(); i++) {
-          CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-          if (data.name.equals("debugSearch")) {
-            existDebug = true;
-            break;
-          }
-        }
-        StringBuffer script = new StringBuffer();
-        if (existDebug) {
-          script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-              + "\") {\n");
-          /*
-           * if (isReload) { script.append("    submitCommandForm('" + efd.columnname +
-           * "', false, null, '../ad_callouts/ComboReloads' + document.frmMain.inpTabId.value + '.html', 'hiddenFrame');"
-           * ); }
-           */
-          script.append("    " + (isReload ? "reload" : "callout") + calloutName + "(keyField);\n");
-          script.append("  }\n");
-          CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-          if (data.method.indexOf(script.toString()) == -1) {
-            StringBuffer complete = new StringBuffer();
-            String header = "function debugSearch(key, text, keyField) {\n";
-            int init = data.method.indexOf(header);
-            complete.append(data.method.substring(0, init + header.length()));
-            complete.append(script.toString());
-            complete.append(data.method.substring(init + header.length(), data.method.length()));
-            CallOutsStructure data1 = new CallOutsStructure();
-            data1.name = "debugSearch";
-            data1.method = complete.toString();
-            vecCallOuts.remove(i);
-            vecCallOuts.addElement(data1);
-          }
-        } else {
-          script.append("\nfunction debugSearch(key, text, keyField) {\n");
-          script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-              + "\") {\n");
-          script.append("    " + (isReload ? "reload" : "callout") + calloutName + "(keyField);\n");
-          script.append("  }\n");
-          script.append("return true;\n}");
-          CallOutsStructure data = new CallOutsStructure();
-          data.name = "debugSearch";
-          data.method = script.toString();
-          vecCallOuts.addElement(data);
-        }
-      } else {
-        if (isDateField(efd.reference)) { // Calendar
-          boolean existDebug = false;
-          int i;
-          for (i = 0; i < vecCallOuts.size(); i++) {
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.name.equals("debugCalendar")) {
-              existDebug = true;
-              break;
-            }
-          }
-          StringBuffer script = new StringBuffer();
-          if (existDebug) {
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.method.indexOf(script.toString()) == -1) {
-              StringBuffer complete = new StringBuffer();
-              String header = "function debugCalendar(date, keyField) {\n";
-              int init = data.method.indexOf(header);
-              complete.append(data.method.substring(0, init + header.length()));
-              complete.append(script.toString());
-              complete.append(data.method.substring(init + header.length(), data.method.length()));
-              CallOutsStructure data1 = new CallOutsStructure();
-              data1.name = "debugCalendar";
-              data1.method = complete.toString();
-              vecCallOuts.remove(i);
-              vecCallOuts.addElement(data1);
-            }
-          } else {
-            script.append("\nfunction debugCalendar(date, keyField) {\n");
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            script.append("return true;\n}");
-            CallOutsStructure data = new CallOutsStructure();
-            data.name = "debugCalendar";
-            data.method = script.toString();
-            vecCallOuts.addElement(data);
-          }
-        } else if (isTimeField(efd.reference)) { // Clock
-          boolean existDebug = false;
-          int i;
-          for (i = 0; i < vecCallOuts.size(); i++) {
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.name.equals("debugClock")) {
-              existDebug = true;
-              break;
-            }
-          }
-          StringBuffer script = new StringBuffer();
-          if (existDebug) {
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.method.indexOf(script.toString()) == -1) {
-              StringBuffer complete = new StringBuffer();
-              String header = "function debugClock(time, keyField) {\n";
-              int init = data.method.indexOf(header);
-              complete.append(data.method.substring(0, init + header.length()));
-              complete.append(script.toString());
-              complete.append(data.method.substring(init + header.length(), data.method.length()));
-              CallOutsStructure data1 = new CallOutsStructure();
-              data1.name = "debugClock";
-              data1.method = complete.toString();
-              vecCallOuts.remove(i);
-              vecCallOuts.addElement(data1);
-            }
-          } else {
-            script.append("\nfunction debugClock(time, keyField) {\n");
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            script.append("return true;\n}");
-            CallOutsStructure data = new CallOutsStructure();
-            data.name = "debugClock";
-            data.method = script.toString();
-            vecCallOuts.addElement(data);
-          }
-        } else if (isDecimalNumber(efd.reference) || isPriceNumber(efd.reference)
-            || isIntegerNumber(efd.reference) || isGeneralNumber(efd.reference)
-            || isQtyNumber(efd.reference)) { // Calculator
-          boolean existDebug = false;
-          int i;
-          for (i = 0; i < vecCallOuts.size(); i++) {
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.name.equals("debugCalculator")) {
-              existDebug = true;
-              break;
-            }
-          }
-          StringBuffer script = new StringBuffer();
-          if (existDebug) {
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.method.indexOf(script.toString()) == -1) {
-              StringBuffer complete = new StringBuffer();
-              String header = "function debugCalculator(num, keyField) {\n";
-              int init = data.method.indexOf(header);
-              complete.append(data.method.substring(0, init + header.length()));
-              complete.append(script.toString());
-              complete.append(data.method.substring(init + header.length(), data.method.length()));
-              CallOutsStructure data1 = new CallOutsStructure();
-              data1.name = "debugCalculator";
-              data1.method = complete.toString();
-              vecCallOuts.remove(i);
-              vecCallOuts.addElement(data1);
-            }
-          } else {
-            script.append("\nfunction debugCalculator(num, keyField) {\n");
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            script.append("return true;\n}");
-            CallOutsStructure data = new CallOutsStructure();
-            data.name = "debugCalculator";
-            data.method = script.toString();
-            vecCallOuts.addElement(data);
-          }
-        } else if (isLikeType(efd.reference)) { // Keyboard
-          boolean existDebug = false;
-          int i;
-          for (i = 0; i < vecCallOuts.size(); i++) {
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.name.equals("debugKeyboard")) {
-              existDebug = true;
-              break;
-            }
-          }
-          StringBuffer script = new StringBuffer();
-          if (existDebug) {
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-            if (data.method.indexOf(script.toString()) == -1) {
-              StringBuffer complete = new StringBuffer();
-              String header = "function debugKeyboard(text, keyField) {\n";
-              int init = data.method.indexOf(header);
-              complete.append(data.method.substring(0, init + header.length()));
-              complete.append(script.toString());
-              complete.append(data.method.substring(init + header.length(), data.method.length()));
-              CallOutsStructure data1 = new CallOutsStructure();
-              data1.name = "debugKeyboard";
-              data1.method = complete.toString();
-              vecCallOuts.remove(i);
-              vecCallOuts.addElement(data1);
-            }
-          } else {
-            script.append("\nfunction debugKeyboard(text, keyField) {\n");
-            script.append("  if (keyField==\"inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "\") {\n");
-            script.append("    " + (isReload ? "reload" : "callout") + calloutName
-                + "(keyField);\n");
-            script.append("  }\n");
-            script.append("return true;\n}");
-            CallOutsStructure data = new CallOutsStructure();
-            data.name = "debugKeyboard";
-            data.method = script.toString();
-            vecCallOuts.addElement(data);
-          }
-        }
-        html.append((isReload ? "reload" : "callout") + calloutName + "(this.name);");
-      }
-
-      for (int i = 0; i < vecCallOuts.size(); i++) {
-        CallOutsStructure data = (CallOutsStructure) vecCallOuts.elementAt(i);
-        if (data.name.equals(calloutName)) {
-          existCallOut = true;
-          break;
-        }
-      }
-      if (!existCallOut) {
-        StringBuffer strCallOut = new StringBuffer();
-        if (isReload) {
-          strCallOut.append("\nfunction reload" + calloutName + "(changedField) {\n");
-          strCallOut
-              .append("    submitCommandForm(changedField, false, null, '../ad_callouts/ComboReloads' + document.frmMain.inpTabId.value + '.html', 'hiddenFrame', null, null, true);\n");
-        } else {
-          strCallOut.append("\nfunction callout" + calloutName + "(changedField) {\n");
-          strCallOut
-              .append(
-                  "submitCommandFormParameter('DEFAULT', frmMain.inpLastFieldChanged, changedField, false, null, '..")
-              .append(efd.mappingnameCallout).append("', 'hiddenFrame', null, null, true);\n");
-        }
-        strCallOut.append("return true;\n");
-        strCallOut.append("}\n");
-        CallOutsStructure data = new CallOutsStructure();
-        data.name = efd.calloutname;
-        data.method = strCallOut.toString();
-        vecCallOuts.addElement(data);
-      }
-    }
-    return html.toString();
-  }
-
   public static String findField(ConnectionProvider conn, EditionFieldsData[] fields,
       EditionFieldsData[] auxiliars, String fieldName) {
     if (fields == null)
@@ -1312,350 +233,6 @@
     return "";
   }
 
-  public static String searchsCommand(EditionFieldsData efd, boolean fromButton, String tabId,
-      ConnectionProvider conn, String windowId, EditionFieldsData[] fieldsData,
-      EditionFieldsData[] auxiliarsData) {
-    StringBuffer params = new StringBuffer();
-    StringBuffer html = new StringBuffer();
-    String strMethodName = "openSearch";
-    if (!fromButton) {
-      params.append(", 'Command'");
-      params.append(", 'KEY'");
-    }
-    params.append(", 'WindowID'");
-    params.append(", '" + windowId + "'");
-    String field = findField(conn, fieldsData, auxiliarsData, "issotrxtab");
-    if (!field.equals("")) {
-      params.append(", 'inpisSOTrxTab'");
-      params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-    }
-    String searchName = (efd.reference.equals("25") ? "/info/Account" : ("/info/" + FormatUtilities
-        .replace(efd.searchname.trim())))
-        + "_FS.html";
-    EditionFieldsData[] fieldsSearch = null;
-    try {
-      fieldsSearch = EditionFieldsData.selectSearchs(conn, "I", efd.referencevalue);
-    } catch (ServletException ex) {
-      ex.printStackTrace();
-    }
-    if (fieldsSearch != null && fieldsSearch.length > 0) {
-      searchName = fieldsSearch[0].mappingname;
-      if (!fieldsSearch[0].referencevalue.equals("")) {
-        for (int i = 0; i < fieldsSearch.length; i++) {
-          field = findField(conn, fieldsData, auxiliarsData, fieldsSearch[i].referencevalue);
-          if (!field.equals("")) {
-            params.append(", 'inp").append(fieldsSearch[i].columnnameinp).append("'");
-            params
-                .append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-          }
-        }
-      }
-    } else if (efd.searchname.equalsIgnoreCase("PRODUCT COMPLETE")) {
-      field = findField(conn, fieldsData, auxiliarsData, "m_warehouse_id");
-      if (!field.equals("")) {
-        params.append(", 'inpWarehouse'");
-        params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-      }
-      field = findField(conn, fieldsData, auxiliarsData, "c_bpartner_id");
-      if (!field.equals("")) {
-        params.append(", 'inpBPartner'");
-        params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-      }
-    } else if (efd.searchname.toUpperCase().startsWith("ATTRIBUTE")) {
-      strMethodName = "openPAttribute";
-      params.append(", 'inpKeyValue'");
-      params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-          + ".value");
-      params.append(", 'inpwindowId'");
-      params.append(", document.frmMain.inpwindowId.value");
-      field = findField(conn, fieldsData, auxiliarsData, "m_product_id");
-      if (!field.equals("")) {
-        params.append(", 'inpProduct'");
-        params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-      }
-      field = findField(conn, fieldsData, auxiliarsData, "m_locator_id");
-      if (!field.equals("")) {
-        params.append(", 'inpLocatorId'");
-        params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-      }
-    } else if (efd.reference.equals("25")) {
-      field = findField(conn, fieldsData, auxiliarsData, "c_acctschema_id");
-      if (!field.equals("")) {
-        params.append(", 'inpAcctSchema'");
-        params.append(", inputValue(document.frmMain.inp" + Sqlc.TransformaNombreColumna(field)
-            + ")");
-      }
-    }
-    /*
-     * if (efd.searchname.equalsIgnoreCase("PRODUCT")) { field=findField(conn, fieldsData,
-     * auxiliarsData, "m_pricelist_id"); if (!field.equals("")) { params.append(", 'inpPriceList'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); }
-     * field=findField(conn, fieldsData, auxiliarsData, "m_warehouse_id"); if (!field.equals("")) {
-     * params.append(", 'inpWarehouse'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(field) + ".value"); } field=findField(conn, fieldsData,
-     * auxiliarsData, "dateordered"); if (!field.equals("")) { params.append(", 'inpDate'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.searchname.equalsIgnoreCase("PROJECT")) { field=findField(conn, fieldsData,
-     * auxiliarsData, "c_bpartner_id"); if (!field.equals("")) { params.append(", 'inpBPartner'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.searchname.equalsIgnoreCase("PRODUCT COMPLETE")) { field=findField(conn,
-     * fieldsData, auxiliarsData, "m_warehouse_id"); if (!field.equals("")) {
-     * params.append(", 'inpWarehouse'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(field) + ".value"); } field=findField(conn, fieldsData,
-     * auxiliarsData, "c_bpartner_id"); if (!field.equals("")) { params.append(", 'inpBPartner'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.searchname.equalsIgnoreCase("SALES ORDER LINE")) { field=findField(conn,
-     * fieldsData, auxiliarsData, "c_bpartner_id"); if (!field.equals("")) {
-     * params.append(", 'inpBPartner'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(field) + ".value"); } field=findField(conn, fieldsData,
-     * auxiliarsData, "m_product_id"); if (!field.equals("")) { params.append(", 'inpProduct'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.searchname.equalsIgnoreCase("SHIPMENT/RECEPIT LINE")) { field=findField(conn,
-     * fieldsData, auxiliarsData, "c_bpartner_id"); if (!field.equals("")) {
-     * params.append(", 'inpBPartner'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(field) + ".value"); } field=findField(conn, fieldsData,
-     * auxiliarsData, "m_product_id"); if (!field.equals("")) { params.append(", 'inpProduct'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.searchname.toUpperCase().startsWith("ATTRIBUTE")) { strMethodName =
-     * "openPAttribute"; params.append(", 'inpKeyValue'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(efd.columnnameinp) + ".value");
-     * params.append(", 'inpwindowId'"); params.append(", document.frmMain.inpwindowId.value");
-     * field=findField(conn, fieldsData, auxiliarsData, "m_product_id"); if (!field.equals("")) {
-     * params.append(", 'inpProduct'"); params.append(", document.frmMain.inp" +
-     * Sqlc.TransformaNombreColumna(field) + ".value"); } field=findField(conn, fieldsData,
-     * auxiliarsData, "m_locator_id"); if (!field.equals("")) { params.append(", 'inpLocatorId'");
-     * params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value"); } }
-     * else if (efd.reference.equals("25")) { field=findField(conn, fieldsData, auxiliarsData,
-     * "c_acctschema_id"); if (!field.equals("")) { params.append(", 'inpAcctSchema'");
-     * params.append(", inputValue(document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) +
-     * ")"); } }
-     */
-    html.append(strMethodName + "(null, null, '.." + searchName + "', null, "
-        + ((efd.calloutname.equals("")) ? "false" : "true") + ", 'frmMain', 'inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "', 'inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "_R', document.frmMain.inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-        + "_R.value, 'inpIDValue', document.frmMain.inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp) + ".value" + params.toString() + ");");
-    return html.toString();
-  }
-
-  public static String productSearch(EditionFieldsData efd, int maxTextboxLength,
-      Vector<Object> vecCallOuts, String tabId, ConnectionProvider conn, String windowId,
-      EditionFieldsData[] fieldsData, EditionFieldsData[] auxiliarsData) {
-    StringBuffer html = new StringBuffer();
-    Vector<Object> vec = new Vector<Object>();
-    efd.searchname = "Product Complete";
-    html.append(htmlFields(efd, "_LOC", "_LOC", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_ATR", "_ATR", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_PQTY", "_PQTY", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_PUOM", "_PUOM", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_QTY", "_QTY", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_UOM", "_UOM", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_PLIST", "_PLIST", true, maxTextboxLength, true, true,
-        vecCallOuts, "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_PSTD", "_PSTD", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_PLIM", "_PLIM", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    html.append(htmlFields(efd, "_CURR", "_CURR", true, maxTextboxLength, true, true, vecCallOuts,
-        "", vec, null, false, 0));
-    if (!efd.displaylogic.equals("")) {
-      html.append("<span id=\"" + efd.columnname + "_btt\">");
-    }
-    html.append("<a href=\"#\"");
-    html.append("onClick=\""
-        + searchsCommand(efd, true, tabId, conn, windowId, fieldsData, auxiliarsData)
-        + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img alt=\"").append(efd.name).append(
-        "\" title=\"").append(efd.name).append("\"");
-    html.append(" width=\"").append(IMAGE_BUTTON_WIDTH).append("\" height=\"").append(
-        IMAGE_BUTTON_HEIGHT).append("\" ");
-    html.append("border=\"0\" src=\"../../../../../web/images/"
-        + FormatUtilities.replace(efd.searchname.trim()) + ".jpg\" id=\"button"
-        + FormatUtilities.replace(efd.searchname.trim()) + "\"></a>");
-    if (!efd.displaylogic.equals("")) {
-      html.append("</span>");
-    }
-    return html.toString();
-  }
-
-  public static String searchs(EditionFieldsData efd, int maxTextboxLength,
-      Vector<Object> vecCallOuts, String tabId, ConnectionProvider conn, String windowId,
-      EditionFieldsData[] fieldsData, EditionFieldsData[] auxiliarsData) {
-    StringBuffer html = new StringBuffer();
-    Vector<Object> vec = new Vector<Object>();
-    EditionFieldsData[] fieldsSearch = null;
-    try {
-      fieldsSearch = EditionFieldsData.selectSearchs(conn, "O", efd.referencevalue);
-    } catch (ServletException ex) {
-      ex.printStackTrace();
-    }
-    if (fieldsSearch != null && fieldsSearch.length > 0) {
-      if (!fieldsSearch[0].columnnameinp.equals("")) {
-        String columnnameinp = efd.columnnameinp;
-        for (int i = 0; i < fieldsSearch.length; i++) {
-          efd.columnnameinp = fieldsSearch[i].columnnameinp;
-          html.append(htmlFields(efd, fieldsSearch[i].columnnameEnd, fieldsSearch[i].columnnameEnd,
-              true, maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-        }
-        efd.columnnameinp = columnnameinp;
-      }
-    }
-    /*
-     * if (efd.searchname.toUpperCase().indexOf("BUSINESS")!=-1) { html.append(htmlFields(efd,
-     * "_LOC", "_LOC", true, maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-     * html.append(htmlFields(efd, "_CON", "_CON", true, maxTextboxLength, true, true, vecCallOuts,
-     * "", vec, null, false, 0)); } else if (efd.searchname.equalsIgnoreCase("PRODUCT")) {
-     * html.append(htmlFields(efd, "_LOC", "_LOC", true, maxTextboxLength, true, true, vecCallOuts,
-     * "", vec, null, false, 0)); html.append(htmlFields(efd, "_ATR", "_ATR", true,
-     * maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-     * html.append(htmlFields(efd, "_PQTY", "_PQTY", true, maxTextboxLength, true, true,
-     * vecCallOuts, "", vec, null, false, 0)); html.append(htmlFields(efd, "_PUOM", "_PUOM", true,
-     * maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-     * html.append(htmlFields(efd, "_QTY", "_QTY", true, maxTextboxLength, true, true, vecCallOuts,
-     * "", vec, null, false, 0)); html.append(htmlFields(efd, "_PLIST", "_PLIST", true,
-     * maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-     * html.append(htmlFields(efd, "_PSTD", "_PSTD", true, maxTextboxLength, true, true,
-     * vecCallOuts, "", vec, null, false, 0)); html.append(htmlFields(efd, "_UOM", "_UOM", true,
-     * maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0));
-     * html.append(htmlFields(efd, "_PLIM", "_PLIM", true, maxTextboxLength, true, true,
-     * vecCallOuts, "", vec, null, false, 0)); html.append(htmlFields(efd, "_CURR", "_CURR", true,
-     * maxTextboxLength, true, true, vecCallOuts, "", vec, null, false, 0)); }
-     */
-    if (!efd.displaylogic.equals("")) {
-      html.append("<span id=\"" + efd.columnname + "_btt\">");
-    }
-    html.append("<a href=\"#\"");
-    html.append("onClick=\""
-        + searchsCommand(efd, true, tabId, conn, windowId, fieldsData, auxiliarsData)
-        + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img alt=\"").append(efd.name).append(
-        "\" title=\"").append(efd.name).append("\"");
-    html.append(" width=\"").append(IMAGE_BUTTON_WIDTH).append("\" height=\"").append(
-        IMAGE_BUTTON_HEIGHT).append("\" ");
-    html.append("border=\"0\" src=\"../../../../../web/images/"
-        + (efd.reference.equals("25") ? "Account" : FormatUtilities.replace(efd.searchname.trim()))
-        + ".jpg\" id=\"button" + FormatUtilities.replace(efd.searchname.trim()) + "\"></a>");
-    if (!efd.displaylogic.equals("")) {
-      html.append("</span>");
-    }
-    return html.toString();
-  }
-
-  public static String locatorCommands(EditionFieldsData efd, boolean fromButton, String tabId,
-      ConnectionProvider conn, String windowId, EditionFieldsData[] fieldsData,
-      EditionFieldsData[] auxiliarsData) {
-    StringBuffer params = new StringBuffer();
-    StringBuffer html = new StringBuffer();
-    if (!fromButton) {
-      params.append(", 'Command'");
-      params.append(", 'KEY'");
-    }
-    params.append(", 'WindowID'");
-    params.append(", '" + windowId + "'");
-    String field = findField(conn, fieldsData, auxiliarsData, "m_warehouse_id");
-    if (!field.equals("")) {
-      params.append(", 'inpmWarehouseId'");
-      params.append(", document.frmMain.inp" + Sqlc.TransformaNombreColumna(field) + ".value");
-    }
-    html.append("openSearch(null, null, '../info/Locator").append(
-        (efd.reference.equals("800013") ? "_Detail" : ""))
-        .append(
-            "_FS.html', null, " + ((efd.calloutname.equals("")) ? "false" : "true")
-                + ", 'frmMain', 'inp" + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "', 'inp"
-                + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "_R', document.frmMain.inp"
-                + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-                + "_R.value, 'inpIDValue', document.frmMain.inp"
-                + Sqlc.TransformaNombreColumna(efd.columnnameinp) + ".value" + params.toString()
-                + ");");
-    return html.toString();
-  }
-
-  public static String locator(EditionFieldsData efd, int maxTextboxLength,
-      Vector<Object> vecCallOuts, String tabId, ConnectionProvider conn, String windowId,
-      EditionFieldsData[] fieldsData, EditionFieldsData[] auxiliarsData) {
-    StringBuffer html = new StringBuffer();
-
-    if (!efd.displaylogic.equals("")) {
-      html.append("<span id=\"" + efd.columnname + "_btt\">");
-    }
-    html.append("<a href=\"#\"");
-    html.append("onClick=\""
-        + locatorCommands(efd, true, tabId, conn, windowId, fieldsData, auxiliarsData)
-        + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img alt=\"").append(efd.name).append(
-        "\" title=\"").append(efd.name).append("\"");
-    html.append(" width=\"").append(IMAGE_BUTTON_WIDTH).append("\" height=\"").append(
-        IMAGE_BUTTON_HEIGHT).append("\" ");
-    html
-        .append("border=\"0\" src=\"../../../../../web/images/Locator.jpg\" id=\"buttonLocator\"></a>");
-    if (!efd.displaylogic.equals("")) {
-      html.append("</span>");
-    }
-    return html.toString();
-  }
-
-  public static String locationCommands(EditionFieldsData efd) {
-    StringBuffer html = new StringBuffer();
-
-    html.append("openLocation(null, null, '../info/Location_FS.html', null, "
-        + ((efd.calloutname.equals("")) ? "false" : "true") + ", 'frmMain', 'inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "', 'inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp) + "_R', document.frmMain.inp"
-        + Sqlc.TransformaNombreColumna(efd.columnnameinp)
-        + ".value, 'inpwindowId', document.frmMain.inpwindowId.value);");
-    return html.toString();
-  }
-
-  public static String location(EditionFieldsData efd) {
-    StringBuffer html = new StringBuffer();
-
-    if (!efd.displaylogic.equals("")) {
-      html.append("<span id=\"" + efd.columnname + "_btt\">");
-    }
-    html.append("<a href=\"#\"");
-    html.append("onClick=\"" + locationCommands(efd) + "return false;\" ");
-    html.append("onMouseOut=\"window.status='';return true;\"");
-    html.append("onMouseOver=\"window.status='").append(efd.referenceName).append(
-        "';return true;\" class=\"windowbutton\"><img alt=\"").append(efd.name).append(
-        "\" title=\"").append(efd.name).append("\"");
-    html.append(" width=\"").append(IMAGE_BUTTON_WIDTH).append("\" height=\"").append(
-        IMAGE_BUTTON_HEIGHT).append("\" ");
-    html
-        .append("border=\"0\" src=\"../../../../../web/images/Location.jpg\" id=\"buttonLocation\"></a>");
-    if (!efd.displaylogic.equals("")) {
-      html.append("</span>");
-    }
-    return html.toString();
-  }
-
-  public static String buttonsCommand(EditionFieldsData efd, String servletName) {
-    StringBuffer html = new StringBuffer();
-    if (efd.javaClassName.equals("")) {
-      html.append("openServletNewWindow('BUTTON" + FormatUtilities.replace(efd.columnname)
-          + efd.adProcessId + "', false, '" + servletName + "', 'BUTTON', null, true"
-          + (efd.columnname.equalsIgnoreCase("CreateFrom") ? ",600, 900" : "") + ");return false;");
-    } else {
-      html.append("openServletNewWindow('DEFAULT', false, '.."
-          + (efd.javaClassName.startsWith("/") ? "" : "/") + efd.javaClassName + "', 'BUTTON', '"
-          + efd.adProcessId + "', true" + ",600, 900" + ");return false;");
-    }
-    return html.toString();
-  }
-
   public static String getSQLWadContext(String code, Vector<Object> vecParameters) {
     if (code == null || code.trim().equals(""))
       return "";
@@ -1913,22 +490,13 @@
     }
   }
 
-  public static String getWadDefaultValue(FieldsData fd) {
+  public static String getWadDefaultValue(ConnectionProvider pool, FieldsData fd) {
     if (fd == null)
       return "";
-    if (fd.referencevalue.equals("28") && !fd.name.toUpperCase().endsWith("_ID"))
-      return "N"; // Button
-    else if (fd.referencevalue.equals("20"))
-      return "N"; // YesNo
-    else if (fd.required.equals("Y")) {
-      if (isDecimalNumber(fd.referencevalue) || isPriceNumber(fd.referencevalue)
-          || isIntegerNumber(fd.referencevalue) || isGeneralNumber(fd.referencevalue)
-          || isQtyNumber(fd.referencevalue))
-        return "0";
-      // FIXME: It makes no sense that the default value for an ID or
-      // reference is zero
-    }
-    return "";
+    WADControl control = getWadControlClass(pool, fd.referencevalue, fd.type);
+    control.setData("name", fd.name.toUpperCase());
+    control.setData("required", fd.required);
+    return control.getDefaultValue();
   }
 
   public static String displayLogic(String code, Vector<Object> vecDL,
@@ -2117,123 +685,17 @@
     return false;
   }
 
-  public static boolean isDecimalNumber(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return (reference.equals("12") || reference.equals("22"));
-  }
-
-  public static boolean isGeneralNumber(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("800019");
-  }
-
-  public static boolean isQtyNumber(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("29");
-  }
-
-  public static boolean isPriceNumber(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("800008");
-
-  }
-
-  public static boolean isIntegerNumber(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("11");
-  }
-
-  public static boolean isDateField(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("15");
-  }
-
-  public static boolean isTimeField(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("24");
-  }
-
-  public static boolean isDateTimeField(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-
-    return reference.equals("15") || reference.equals("16") || reference.equals("24");
-  }
-
-  public static boolean isLikeType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("10") || reference.equals("14") || reference.equals("34");
-  }
-
-  public static boolean isTextData(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("15") || reference.equals("20") || reference.equals("17");
-
-  }
-
   public static boolean isSearchValueColumn(String name) {
     if (name == null || name.equals(""))
       return false;
     return (name.equalsIgnoreCase("Value") || name.equalsIgnoreCase("DocumentNo"));
   }
 
-  public static boolean isSelectType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("17") || reference.equals("18") || reference.equals("19");
-  }
-
-  public static boolean isSearchType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("21") || reference.equals("25") || reference.equals("30")
-        || reference.equals("31") || reference.equals("32") || reference.equals("35")
-        || reference.equals("800013") || reference.equals("800011");
-  }
-
-  public static boolean isLinkType(String reference) {
-    if (reference == null || reference.equals(""))
-      return false;
-    return reference.equals("800101");
-  }
-
   public static String sqlCasting(ConnectionProvider conn, String reference, String referencevalue) {
     if (reference == null || reference.equals(""))
       return "";
-    else if (isDateTimeField(reference))
-      return "TO_DATE";
-    else if (reference.equals("19") || isSearchType(reference))
-      return "";
-    else if (isIntegerNumber(reference) || isPriceNumber(reference) || isQtyNumber(reference)
-        || isGeneralNumber(reference) || isDecimalNumber(reference))
-      return "TO_NUMBER";
-    else if (reference.equals("27") || reference.equals("33"))
-      return "TO_NUMBER";
-    else if (reference.equals("28") && (referencevalue.equals("11")))
-      return "TO_NUMBER";
-    else if (reference.equals("18")) {
-      if (referencevalue == null)
-        return "";
-      try {
-        TableRelationData trd[] = TableRelationData.selectRefTable(conn, referencevalue);
-        if (trd == null || trd.length == 0)
-          return "";
-        return sqlCasting(conn, trd[0].referencekey, trd[0].referencevaluekey);
-      } catch (ServletException ex) {
-        log4j.error("sqlCasting: " + ex);
-        return "";
-      }
-    } else
-      return "";
+    WADControl control = WadUtility.getWadControlClass(conn, reference, referencevalue);
+    return control.getSQLCasting();
   }
 
   public static void setPropertyValue(Properties _prop, FieldProvider _field, String _name,
@@ -2312,25 +774,49 @@
     prop.setProperty("isReadOnlyDefinedTab", (isReadOnlyDefinedTab ? "Y" : "N"));
     prop.setProperty("hasParentsFields", (hasParentsFields ? "Y" : "N"));
 
-    String classname = "org.openbravo.wad.controls.WAD"
-        + FormatUtilities.replace(field.getField("referenceName"));
-    WADControl _myClass = null;
-    try {
-      Class<?> c = Class.forName(classname);
-      _myClass = (WADControl) c.newInstance();
-    } catch (ClassNotFoundException ex) {
-      log4j.warn("Couldn´t find class: " + classname);
-      _myClass = new WADControl();
-    }
-    _myClass.setConnection(conn);
+    WADControl _myClass = getWadControlClass(conn, field.getField("AD_Reference_ID"), field
+        .getField("AD_Reference_Value_ID"));
+
     _myClass.setReportEngine(xmlEngine);
     _myClass.setInfo(prop);
     _myClass.initialize();
-    _myClass.setConnection(null);
 
     return _myClass;
   }
 
+  /**
+   * Obtains an instance of the WAD implementator for the reference passed as parameter
+   */
+  public static WADControl getWadControlClass(ConnectionProvider conn, String parentRef,
+      String subRef) {
+    String classname;
+    WADControl control;
+
+    try {
+      classname = WadUtilityData.getReferenceClassName(conn, subRef, parentRef);
+    } catch (ServletException e1) {
+      log4j.warn("Couldn't find reference classname ref " + parentRef + ", subRef " + subRef, e1);
+      return new WADControl();
+    }
+
+    try {
+      Class<?> c = Class.forName(classname);
+      control = (WADControl) c.newInstance();
+      control.setReference(parentRef);
+      control.setSubreference(subRef);
+    } catch (ClassNotFoundException ex) {
+      log4j.warn("Couldn't find class: " + classname);
+      control = new WADControl();
+    } catch (InstantiationException e) {
+      log4j.warn("Couldn't instanciate class: " + classname);
+      control = new WADControl();
+    } catch (IllegalAccessException e) {
+      log4j.warn("Illegal access class: " + classname);
+      control = new WADControl();
+    }
+    return control;
+  }
+
   public static boolean isNewGroup(WADControl control, String strFieldGroup) {
     if (control == null)
       return false;
@@ -2400,35 +886,9 @@
     _displayLogic.append("displayLogicElement('");
     _displayLogic.append(auxControl.getData("ColumnName"));
     _displayLogic.append("_inp', true);\n");
-    if (!auxControl.getData("AD_Reference_ID").equals("28")) {
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_lbl_td', true);\n");
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_lbl', true);\n");
-    }
-    if ((isGeneralNumber(auxControl.getData("AD_Reference_ID"))
-        || isDateField(auxControl.getData("AD_Reference_ID"))
-        || isTimeField(auxControl.getData("AD_Reference_ID"))
-        || isLikeType(auxControl.getData("AD_Reference_ID"))
-        || isDecimalNumber(auxControl.getData("AD_Reference_ID"))
-        || isQtyNumber(auxControl.getData("AD_Reference_ID"))
-        || isPriceNumber(auxControl.getData("AD_Reference_ID"))
-        || isIntegerNumber(auxControl.getData("AD_Reference_ID"))
-        || auxControl.getData("AD_Reference_ID").equals("21")
-        || auxControl.getData("AD_Reference_ID").equals("25")
-        || auxControl.getData("AD_Reference_ID").equals("30")
-        || auxControl.getData("AD_Reference_ID").equals("800011")
-        || auxControl.getData("AD_Reference_ID").equals("31")
-        || auxControl.getData("AD_Reference_ID").equals("32")
-        || auxControl.getData("AD_Reference_ID").equals("35") || isLinkType(auxControl
-        .getData("AD_Reference_ID")))
-        && !auxControl.getData("IsReadOnly").equals("Y") && !isreadonly) {
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_btt', true);\n");
-    }
+
+    _displayLogic.append(auxControl.getDisplayLogic(true, isreadonly));
+
     _displayLogic.append("} else {\n");
     _displayLogic.append("displayLogicElement('");
     _displayLogic.append(auxControl.getData("ColumnName"));
@@ -2436,35 +896,9 @@
     _displayLogic.append("displayLogicElement('");
     _displayLogic.append(auxControl.getData("ColumnName"));
     _displayLogic.append("_inp', false);\n");
-    if (!auxControl.getData("AD_Reference_ID").equals("28")) {
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_lbl_td', false);\n");
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_lbl', false);\n");
-    }
-    if ((isGeneralNumber(auxControl.getData("AD_Reference_ID"))
-        || isDateField(auxControl.getData("AD_Reference_ID"))
-        || isTimeField(auxControl.getData("AD_Reference_ID"))
-        || isLikeType(auxControl.getData("AD_Reference_ID"))
-        || isDecimalNumber(auxControl.getData("AD_Reference_ID"))
-        || isQtyNumber(auxControl.getData("AD_Reference_ID"))
-        || isPriceNumber(auxControl.getData("AD_Reference_ID"))
-        || isIntegerNumber(auxControl.getData("AD_Reference_ID"))
-        || auxControl.getData("AD_Reference_ID").equals("21")
-        || auxControl.getData("AD_Reference_ID").equals("25")
-        || auxControl.getData("AD_Reference_ID").equals("30")
-        || auxControl.getData("AD_Reference_ID").equals("800011")
-        || auxControl.getData("AD_Reference_ID").equals("31")
-        || auxControl.getData("AD_Reference_ID").equals("35")
-        || auxControl.getData("AD_Reference_ID").equals("32") || isLinkType(auxControl
-        .getData("AD_Reference_ID")))
-        && !auxControl.getData("IsReadOnly").equals("Y") && !isreadonly) {
-      _displayLogic.append("displayLogicElement('");
-      _displayLogic.append(auxControl.getData("ColumnName"));
-      _displayLogic.append("_btt', false);\n");
-    }
+
+    _displayLogic.append(auxControl.getDisplayLogic(false, isreadonly));
+
     _displayLogic.append("}\n");
     return _displayLogic.toString();
   }
--- a/src-wad/src/org/openbravo/wad/WadUtility_data.xsql	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/WadUtility_data.xsql	Thu Feb 11 12:10:47 2010 +0100
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,4 +35,18 @@
       <Parameter name="value"/>
       <Parameter name="adLanguage"/>
   </SqlMethod>
+  
+   <SqlMethod name="getReferenceClassName" type="preparedStatement" return="String">
+      <Sql><![CDATA[
+        SELECT COALESCE(R2.WAD_IMPL, R1.WAD_IMPL) AS TEXT
+          FROM AD_REFERENCE R1 LEFT JOIN AD_REFERENCE R2 
+                                 ON R2.PARENTREFERENCE_ID = R1.AD_REFERENCE_ID  
+                                AND R2.AD_REFERENCE_ID = ? 
+         WHERE R1.AD_REFERENCE_ID = ?
+           AND R1.ISBASEREFERENCE = 'Y'
+          ]]>
+      </Sql>
+      <Parameter name="subReference"/>
+      <Parameter name="parentReference"/>
+  </SqlMethod>
 </SqlClass>
--- a/src-wad/src/org/openbravo/wad/controls/WADButton.java	Thu Feb 11 09:08:54 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADButton.java	Thu Feb 11 12:10:47 2010 +0100
@@ -11,17 +11,22 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.wad.controls;
 
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Properties;
+import java.util.Vector;
+
+import javax.servlet.ServletException;
 
 import org.openbravo.utils.FormatUtilities;
+import org.openbravo.wad.FieldsData;
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class WADButton extends WADControl {
@@ -174,4 +179,65 @@
       return "";
   }
 
+  public int addAdditionDefaulJavaFields(StringBuffer strDefaultValues, FieldsData fieldsDef,
+      String tabName, int itable) {
+    // not need to implement sql method as itable is not modified
+    if (fieldsDef.isdisplayed.equals("Y") && !fieldsDef.type.equals("")) {
+      strDefaultValues.append(
+          ", (vars.getLanguage().equals(\"en_US\")?ListData.selectName(this, \"").append(
+          fieldsDef.type).append("\", ").append(fieldsDef.defaultvalue).append(
+          "):ListData.selectNameTrl(this, vars.getLanguage(), \"").append(fieldsDef.type).append(
+          "\", ").append(fieldsDef.defaultvalue).append("))");
+    }
+    return itable;
+  }
+
+  public void processTable(String strTab, Vector<Object> vecFields, Vector<Object> vecTables,
+      Vector<Object> vecWhere, Vector<Object> vecOrder, Vector<Object> vecParameters,
+      String tableName, Vector<Object> vecTableParameters, FieldsData field,
+      Vector<String> vecFieldParameters, Vector<Object> vecCounters) throws ServletException,
+      IOException {
+