fixed bug 0003976: Identifier for parameters in action button are not taken with the column with seqno=1 but the lowest one set as identifier
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 17 Jun 2008 08:24:15 +0000
changeset 1239 e5124b398f64
parent 1238 50275bb5700b
child 1240 d7790e722976
fixed bug 0003976: Identifier for parameters in action button are not taken with the column with seqno=1 but the lowest one set as identifier
src-wad/src/org/openbravo/wad/Fields_data.xsql
src-wad/src/org/openbravo/wad/datasource.xsqlxml
--- a/src-wad/src/org/openbravo/wad/Fields_data.xsql	Mon Jun 16 13:37:32 2008 +0000
+++ b/src-wad/src/org/openbravo/wad/Fields_data.xsql	Tue Jun 17 08:24:15 2008 +0000
@@ -367,7 +367,14 @@
         SELECT MAX(columnname) AS NAME FROM AD_COLUMN, AD_TABLE 
         WHERE AD_TABLE.NAME = ?
           AND AD_COLUMN.ad_table_id = AD_TABLE.ad_table_id
-          AND isidentifier = 'Y' AND SeqNo = (CASE TO_CHAR(AD_TABLE.NAME) WHEN 'C_PaySelectionCheck' THEN 2 ELSE 1 END)
+          AND isidentifier = 'Y' 
+          AND SeqNo = (CASE TO_CHAR(AD_TABLE.NAME) 
+                          WHEN 'C_PaySelectionCheck' THEN 2 
+                          ELSE (SELECT MIN(SeqNo) 
+                                  FROM AD_Column 
+                                 WHERE AD_Table_ID=AD_TABLE.AD_Table_ID 
+                                   AND IsIdentifier='Y')
+                           END)
       </Sql>
       <Parameter name="tableName"/>
   </SqlMethod>
--- a/src-wad/src/org/openbravo/wad/datasource.xsqlxml	Mon Jun 16 13:37:32 2008 +0000
+++ b/src-wad/src/org/openbravo/wad/datasource.xsqlxml	Tue Jun 17 08:24:15 2008 +0000
@@ -188,7 +188,7 @@
 
 <FIELDS_TMP id="sectionActionSearchs">
    &#60;SqlMethod name="selectActDef<PARAMETER_TMP id="params12">table</PARAMETER_TMP>" type="preparedStatement" return="String" default=""&#62;
-    &#60;SqlMethodComment&#62;Select for auxiliar field&#60;/SqlMethodComment&#62;
+    &#60;SqlMethodComment&#62;Select for action search&#60;/SqlMethodComment&#62;
     &#60;Sql&#62;&#60;&#33;[CDATA[
         <PARAMETER_TMP id="Select12">select</PARAMETER_TMP> 
     ]]&#62;&#60;/Sql&#62;