IDEMPIERE-377 Improve current search dialog box / create the messages - fix the call to query

This commit is contained in:
Carlos Ruiz 2012-09-05 18:55:06 -05:00
parent e9cf998938
commit c6c4c65120
3 changed files with 52 additions and 8 deletions

View File

@ -0,0 +1,23 @@
-- Sep 5, 2012 6:21:41 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Name is required',200035,'D','303c9cf1-6159-4b47-82ff-9d10eed69845','NeedsName','Y',TO_DATE('2012-09-05 18:21:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-05 18:21:40','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 5, 2012 6:21:41 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200035 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Sep 5, 2012 6:22:20 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New Query',200036,'D','b12c3245-60f6-4da7-aa47-793370395735','New Query','Y',TO_DATE('2012-09-05 18:22:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-05 18:22:20','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 5, 2012 6:22:20 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200036 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('903_IDEMPIERE-377.sql') FROM dual
;

View File

@ -0,0 +1,23 @@
-- Sep 5, 2012 6:21:41 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Name is required',200035,'D','303c9cf1-6159-4b47-82ff-9d10eed69845','NeedsName','Y',TO_TIMESTAMP('2012-09-05 18:21:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-05 18:21:40','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 5, 2012 6:21:41 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200035 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Sep 5, 2012 6:22:20 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','New Query',200036,'D','b12c3245-60f6-4da7-aa47-793370395735','New Query','Y',TO_TIMESTAMP('2012-09-05 18:22:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-05 18:22:20','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 5, 2012 6:22:20 PM COT
-- IDEMPIERE-377 Improve current search dialog box
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200036 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('903_IDEMPIERE-377.sql') FROM dual
;

View File

@ -111,7 +111,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
/**
*
*/
private static final long serialVersionUID = -5352467965724233821L;
private static final long serialVersionUID = 2452116093966974927L;
// values and label for history combo
private static final String HISTORY_DAY_ALL = "All";
@ -1341,7 +1341,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if(Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
{
m_query.addRestriction(ColumnSQL, Operator, null,
infoName, null);
infoName, null, and, openBrackets);
if (code.length() > 0)
code.append(SEGMENT_SEPARATOR);
code.append(ColumnName)
@ -1381,19 +1381,17 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (parsedValue2 == null)
continue;
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
infoName, infoDisplay, infoDisplay_to);
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
}
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) {
if (!(parsedValue instanceof Integer)) {
continue;
}
m_query
.addRestriction(getSubCategoryWhereClause(((Integer) parsedValue).intValue()));
m_query.addRestriction(getSubCategoryWhereClause(((Integer) parsedValue).intValue()), and, openBrackets);
}
else
m_query.addRestriction(ColumnSQL, Operator, parsedValue,
infoName, infoDisplay);
infoName, infoDisplay, and, openBrackets);
if (code.length() > 0)
code.append(SEGMENT_SEPARATOR);