IDEMPIERE-2837 - Use in a better way saved searches - PR
This commit is contained in:
parent
3baf23c4dd
commit
6fcbe19151
|
@ -201,14 +201,6 @@ UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108
|
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108
|
||||||
;
|
;
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=1000004
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
-- Nov 13, 2019, 3:32:10 PM CET
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200172
|
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200172
|
||||||
;
|
;
|
||||||
|
@ -309,6 +301,22 @@ UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=23, Updated=SysDate WHERE AD_Tree_
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=24, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200171
|
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=24, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200171
|
||||||
;
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:00:32 PM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=0, ReadOnlyLogic=NULL,Updated=TO_DATE('2019-11-14 18:00:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14361
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:00:43 PM CET
|
||||||
|
UPDATE AD_Tab SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_DATE('2019-11-14 18:00:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200275
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:04:27 PM CET
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@#ShowAdvanced@=N', IsToolbarButton=NULL,Updated=TO_DATE('2019-11-14 18:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12249
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:04:31 PM CET
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@#ShowAdvanced@=N', IsToolbarButton=NULL,Updated=TO_DATE('2019-11-14 18:04:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12246
|
||||||
|
;
|
||||||
|
|
||||||
SELECT register_migration_script('201911141249_IDEMPIERE-2837.sql') FROM dual
|
SELECT register_migration_script('201911141249_IDEMPIERE-2837.sql') FROM dual
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -198,14 +198,6 @@ UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=statement_timestamp() WH
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53108
|
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53108
|
||||||
;
|
;
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=14, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=1000000
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=15, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=1000004
|
|
||||||
;
|
|
||||||
|
|
||||||
-- Nov 13, 2019, 3:32:10 PM CET
|
-- Nov 13, 2019, 3:32:10 PM CET
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200172
|
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200172
|
||||||
;
|
;
|
||||||
|
@ -306,7 +298,22 @@ UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=23, Updated=statement_timestamp()
|
||||||
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=24, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200171
|
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=24, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200171
|
||||||
;
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:00:32 PM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=0, ReadOnlyLogic=NULL,Updated=TO_TIMESTAMP('2019-11-14 18:00:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14361
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:00:43 PM CET
|
||||||
|
UPDATE AD_Tab SET ReadOnlyLogic='@#ShowAdvanced@=N',Updated=TO_TIMESTAMP('2019-11-14 18:00:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200275
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:04:27 PM CET
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@#ShowAdvanced@=N', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-11-14 18:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12249
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 14, 2019, 6:04:31 PM CET
|
||||||
|
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@#ShowAdvanced@=N', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-11-14 18:04:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12246
|
||||||
|
;
|
||||||
|
|
||||||
SELECT register_migration_script('201911141249_IDEMPIERE-2837.sql') FROM dual
|
SELECT register_migration_script('201911141249_IDEMPIERE-2837.sql') FROM dual
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,10 @@ import org.compiere.util.Env;
|
||||||
*/
|
*/
|
||||||
public class MUserQuery extends X_AD_UserQuery
|
public class MUserQuery extends X_AD_UserQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -5528419580653430616L;
|
private static final long serialVersionUID = -3606227368868305024L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all active queries of client for Tab
|
* Get all active queries of client for Tab
|
||||||
|
@ -276,5 +275,19 @@ public class MUserQuery extends X_AD_UserQuery
|
||||||
{
|
{
|
||||||
super (ctx, rs, trxName);
|
super (ctx, rs, trxName);
|
||||||
} // MUserQuery
|
} // MUserQuery
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean beforeSave(boolean newRecord) {
|
||||||
|
if (getAD_Tab_ID() > 0) {
|
||||||
|
if (newRecord || is_ValueChanged(COLUMNNAME_AD_Tab_ID)) {
|
||||||
|
MTab tab = new MTab(getCtx(), getAD_Tab_ID(), get_TrxName());
|
||||||
|
setAD_Window_ID(tab.getAD_Window_ID());
|
||||||
|
setAD_Table_ID(tab.getAD_Table_ID());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setAD_Window_ID(0);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // MUserQuery
|
} // MUserQuery
|
||||||
|
|
|
@ -276,29 +276,4 @@ public class MWindow extends X_AD_Window
|
||||||
}
|
}
|
||||||
//end vpj-cd e-evolution
|
//end vpj-cd e-evolution
|
||||||
|
|
||||||
/**
|
|
||||||
* get Window ID
|
|
||||||
* @param int AD_Tab_ID
|
|
||||||
* @return int retValue
|
|
||||||
*/
|
|
||||||
public static int getWindow_ID(int AD_Tab_ID) {
|
|
||||||
int retValue = 0;
|
|
||||||
String sql = "SELECT AD_Window_ID FROM AD_Tab WHERE AD_Tab_ID = ?";
|
|
||||||
PreparedStatement pstmt = null;
|
|
||||||
ResultSet rs = null;
|
|
||||||
try {
|
|
||||||
pstmt = DB.prepareStatement(sql, null);
|
|
||||||
pstmt.setInt(1, AD_Tab_ID);
|
|
||||||
rs = pstmt.executeQuery();
|
|
||||||
if (rs.next())
|
|
||||||
retValue = rs.getInt(1);
|
|
||||||
} catch (SQLException e) {
|
|
||||||
s_log.log(Level.SEVERE, sql, e);
|
|
||||||
retValue = -1;
|
|
||||||
} finally {
|
|
||||||
DB.close(rs, pstmt);
|
|
||||||
}
|
|
||||||
return retValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // M_Window
|
} // M_Window
|
||||||
|
|
|
@ -88,7 +88,6 @@ import org.compiere.model.MQuery;
|
||||||
import org.compiere.model.MRole;
|
import org.compiere.model.MRole;
|
||||||
import org.compiere.model.MTable;
|
import org.compiere.model.MTable;
|
||||||
import org.compiere.model.MUserQuery;
|
import org.compiere.model.MUserQuery;
|
||||||
import org.compiere.model.MWindow;
|
|
||||||
import org.compiere.util.AdempiereSystemError;
|
import org.compiere.util.AdempiereSystemError;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
@ -195,7 +194,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
public static final int FIELDLENGTH = 20;
|
public static final int FIELDLENGTH = 20;
|
||||||
|
|
||||||
private int m_AD_Tab_ID = 0;
|
private int m_AD_Tab_ID = 0;
|
||||||
private int m_AD_Window_ID = 0;
|
|
||||||
private MUserQuery[] userQueries;
|
private MUserQuery[] userQueries;
|
||||||
private Rows contentSimpleRows;
|
private Rows contentSimpleRows;
|
||||||
private boolean m_createNew = false;
|
private boolean m_createNew = false;
|
||||||
|
@ -268,9 +266,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
m_findFields = findFields;
|
m_findFields = findFields;
|
||||||
m_sNew = "** ".concat(Msg.getMsg(Env.getCtx(), "New Query")).concat(" **");
|
m_sNew = "** ".concat(Msg.getMsg(Env.getCtx(), "New Query")).concat(" **");
|
||||||
m_AD_Tab_ID = adTabId;
|
m_AD_Tab_ID = adTabId;
|
||||||
if (m_AD_Tab_ID > 0) {
|
|
||||||
m_AD_Window_ID = MWindow.getWindow_ID(m_AD_Tab_ID);
|
|
||||||
}
|
|
||||||
m_minRecords = minRecords;
|
m_minRecords = minRecords;
|
||||||
m_isCancel = true;
|
m_isCancel = true;
|
||||||
//
|
//
|
||||||
|
@ -1807,7 +1802,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
uq = new MUserQuery (Env.getCtx(), 0, null);
|
uq = new MUserQuery (Env.getCtx(), 0, null);
|
||||||
uq.setName (name);
|
uq.setName (name);
|
||||||
uq.setAD_Tab_ID(m_AD_Tab_ID); //red1 UserQuery [ 1798539 ] taking in new field from Compiere
|
uq.setAD_Tab_ID(m_AD_Tab_ID); //red1 UserQuery [ 1798539 ] taking in new field from Compiere
|
||||||
uq.setAD_Window_ID(m_AD_Window_ID); // IDEMPIERE-2837 Use in a better way saved searches
|
|
||||||
uq.set_ValueOfColumn("AD_User_ID", Env.getAD_User_ID(Env.getCtx())); // required set_Value for System=0 user
|
uq.set_ValueOfColumn("AD_User_ID", Env.getAD_User_ID(Env.getCtx())); // required set_Value for System=0 user
|
||||||
}
|
}
|
||||||
if (shareAllUsers)
|
if (shareAllUsers)
|
||||||
|
|
Loading…
Reference in New Issue