IDEMPIERE-1877 Product Info Window Implementation broke the usage of barcode reader

This commit is contained in:
Carlos Ruiz 2014-04-11 12:10:56 -05:00
parent 1c3b7c4179
commit e7730780ba
5 changed files with 32 additions and 5 deletions

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Apr 11, 2014 10:56:44 AM COT
-- IDEMPIERE-1877 Product Info Window Implementation broke the usage of barcode reader
UPDATE AD_InfoColumn SET IsIdentifier='Y',Updated=TO_DATE('2014-04-11 10:56:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200003
;
-- Apr 11, 2014 10:56:47 AM COT
UPDATE AD_InfoColumn SET IsIdentifier='Y',Updated=TO_DATE('2014-04-11 10:56:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200004
;
SELECT register_migration_script('201404111058_IDEMPIERE-1877.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- Apr 11, 2014 10:56:44 AM COT
-- IDEMPIERE-1877 Product Info Window Implementation broke the usage of barcode reader
UPDATE AD_InfoColumn SET IsIdentifier='Y',Updated=TO_TIMESTAMP('2014-04-11 10:56:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200003
;
-- Apr 11, 2014 10:56:47 AM COT
UPDATE AD_InfoColumn SET IsIdentifier='Y',Updated=TO_TIMESTAMP('2014-04-11 10:56:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200004
;
SELECT register_migration_script('201404111058_IDEMPIERE-1877.sql') FROM dual
;

View File

@ -81,7 +81,7 @@ public class MInfoWindow extends X_AD_InfoWindow
Query query = new Query(getCtx(), MTable.get(getCtx(), I_AD_InfoColumn.Table_ID), I_AD_InfoColumn.COLUMNNAME_AD_InfoWindow_ID+"=?", get_TrxName());
List<MInfoColumn> list = query.setParameters(getAD_InfoWindow_ID())
.setOnlyActiveRecords(true)
.setOrderBy(I_AD_InfoColumn.COLUMNNAME_SeqNo)
.setOrderBy("SeqNo, AD_InfoColumn_ID")
.list();
for(int i = list.size() - 1; i >= 0; i--) {
MInfoColumn infoColumn = list.get(i);
@ -95,7 +95,7 @@ public class MInfoWindow extends X_AD_InfoWindow
Query query = new Query(getCtx(), MTable.get(getCtx(), I_AD_InfoColumn.Table_ID), I_AD_InfoColumn.COLUMNNAME_AD_InfoWindow_ID+"=?", get_TrxName());
List<MInfoColumn> list = query.setParameters(getAD_InfoWindow_ID())
.setOnlyActiveRecords(true)
.setOrderBy(I_AD_InfoColumn.COLUMNNAME_SeqNo)
.setOrderBy("SeqNo, AD_InfoColumn_ID")
.list();
return list.toArray(new MInfoColumn[0]);
}

View File

@ -140,8 +140,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
}
private void processQueryValue() {
//try first 2 only
for(int i = 0; i < identifiers.size() && i < 2; i++) {
for (int i = 0; i < identifiers.size(); i++) {
WEditor editor = identifiers.get(i);
editor.setValue(queryValue);
testCount();

View File

@ -122,7 +122,8 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
if (queryValue != null && queryValue.length() > 0)
{
MTable table = MTable.get(Env.getCtx(), p_tableName);
if (table.getIdentifierColumns().length > 1)
if ( table.getIdentifierColumns().length > 1
&& !p_tableName.startsWith("AD_")) // 32 AD tables with identifiers containing _
{
String separator = I_C_ElementValue.Table_Name.equalsIgnoreCase(p_tableName) ? "-" : "_";
if (txt2.isVisible())