IDEMPIERE-4736 FHCA-2461 IDEMP - ad_column table - Framework query improvement (#628)
* IDEMPIERE-4736 FHCA-2461 IDEMP - ad_column table - Framework query improvement * * Rename migration scripts to normal convention
This commit is contained in:
parent
86bbb08bff
commit
c8fd9a8805
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Mar 9, 2021, 1:20:04 PM CET
|
||||||
|
UPDATE AD_Ref_Table SET WhereClause='AD_Table.IsView=''N'' AND AD_Table.IsActive=''Y'' AND EXISTS (SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID=AD_Table.AD_Table_ID AND UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_ID'' AND c.IsActive=''Y'')',Updated=TO_DATE('2021-03-09 13:20:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=200165
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202103091322_IDEMPIERE-4736.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Mar 9, 2021, 1:20:04 PM CET
|
||||||
|
UPDATE AD_Ref_Table SET WhereClause='AD_Table.IsView=''N'' AND AD_Table.IsActive=''Y'' AND EXISTS (SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID=AD_Table.AD_Table_ID AND UPPER(c.ColumnName)=UPPER(AD_Table.TableName)||''_ID'' AND c.IsActive=''Y'')',Updated=TO_TIMESTAMP('2021-03-09 13:20:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=200165
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202103091322_IDEMPIERE-4736.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -972,7 +972,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
String sql = "SELECT AD_Table_ID, AccessLevel, TableName, IsView, "
|
String sql = "SELECT AD_Table_ID, AccessLevel, TableName, IsView, "
|
||||||
+ "(SELECT ColumnName FROM AD_COLUMN WHERE AD_COLUMN.AD_TABLE_ID = AD_TABLE.AD_TABLE_ID AND AD_COLUMN.COLUMNNAME = AD_TABLE.TABLENAME || '_ID') "
|
+ "(SELECT ColumnName FROM AD_COLUMN WHERE AD_COLUMN.AD_TABLE_ID = AD_TABLE.AD_TABLE_ID AND UPPER(AD_COLUMN.COLUMNNAME) = UPPER(AD_TABLE.TABLENAME) || '_ID') "
|
||||||
+ "FROM AD_Table WHERE IsActive='Y'";
|
+ "FROM AD_Table WHERE IsActive='Y'";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -840,7 +840,7 @@ public class Login
|
||||||
Ini.setProperty(Ini.P_PRINTER, printerName);
|
Ini.setProperty(Ini.P_PRINTER, printerName);
|
||||||
|
|
||||||
// Load Role Info
|
// Load Role Info
|
||||||
MRole.getDefault(m_ctx, true);
|
MRole.getDefault(m_ctx, false);
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
loadUserPreferences();
|
loadUserPreferences();
|
||||||
|
|
|
@ -686,9 +686,9 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
|
||||||
userPreference.setProperty(UserPreference.P_WAREHOUSE, lstItemWarehouse != null ? (String) lstItemWarehouse.getValue() : "0");
|
userPreference.setProperty(UserPreference.P_WAREHOUSE, lstItemWarehouse != null ? (String) lstItemWarehouse.getValue() : "0");
|
||||||
userPreference.savePreference();
|
userPreference.savePreference();
|
||||||
|
|
||||||
//force reload of default role
|
//force reload of default role when more than 1 client
|
||||||
MRole.getDefault(m_ctx, true);
|
if (lstClient.getChildren().size() > 1)
|
||||||
|
MRole.getDefault(m_ctx, true);
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue