diff --git a/migration/i1.0c-release/oracle/201308201752_IDEMPIERE-1263.sql b/migration/i1.0c-release/oracle/201308201752_IDEMPIERE-1263.sql new file mode 100644 index 0000000000..afbf44a72e --- /dev/null +++ b/migration/i1.0c-release/oracle/201308201752_IDEMPIERE-1263.sql @@ -0,0 +1,17 @@ +-- Aug 20, 2013 5:51:40 PM COT +-- IDEMPIERE-1263 can set "Reservation Locator" of a warehouse by locator of other warehouse +INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Description,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID,AD_Client_ID) VALUES ('M_Locator.M_Warehouse_ID=@0|M_Warehouse_ID@',200053,'D','M_ReserveLocator Tab 0','Where the warehouse field is at tab level 0','S','7086e2fa-88d8-4534-a9f7-3ac151ef840b',100,100,TO_DATE('2013-08-20 17:51:38','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-08-20 17:51:38','YYYY-MM-DD HH24:MI:SS'),'Y',0,0) +; + +-- Aug 20, 2013 5:52:08 PM COT +-- IDEMPIERE-1263 can set "Reservation Locator" of a warehouse by locator of other warehouse +UPDATE AD_Column SET AD_Val_Rule_ID=200053,Updated=TO_DATE('2013-08-20 17:52:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200704 +; + +-- Aug 26, 2013 11:46:23 AM COT +-- IDEMPIERE-1263 can set Reservation Locator of a warehouse by locator of other warehouse +UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=4, ColumnSpan=2,Updated=TO_DATE('2013-08-26 11:46:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200649 +; + +SELECT register_migration_script('201308201752_IDEMPIERE-1263.sql') FROM dual +; diff --git a/migration/i1.0c-release/oracle/201308260558_IDEMPIERE-1298.sql b/migration/i1.0c-release/oracle/201308260558_IDEMPIERE-1298.sql index 117dcdf138..fd3286f373 100644 --- a/migration/i1.0c-release/oracle/201308260558_IDEMPIERE-1298.sql +++ b/migration/i1.0c-release/oracle/201308260558_IDEMPIERE-1298.sql @@ -181,11 +181,6 @@ INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Colu INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210844 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; --- Aug 23, 2013 6:27:33 PM MYT --- IDEMPIERE-1298 2Pack: Support copying of data from one client to another -CREATE TABLE AD_Package_UUID_Map (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Package_UUID_Map_ID NUMBER(10) NOT NULL, AD_Package_UUID_Map_UU NVARCHAR2(36) NOT NULL, AD_Table_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Source_UUID NVARCHAR2(36) NOT NULL, Target_UUID NVARCHAR2(36) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT AD_Package_UUID_Map_Key PRIMARY KEY (AD_Package_UUID_Map_ID)) -; - -- Aug 23, 2013 6:27:55 PM MYT -- IDEMPIERE-1298 2Pack: Support copying of data from one client to another UPDATE AD_Column SET IsKey='N',Updated=TO_DATE('2013-08-23 18:27:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=210835 diff --git a/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql b/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..1bd401bf1f --- /dev/null +++ b/migration/i1.0c-release/oracle/201308261242_IDEMPIERE-1160.sql @@ -0,0 +1,8 @@ +-- Aug 26, 2013 12:41:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_DATE('2013-08-26 12:41:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56486 +; + +SELECT register_migration_script('201308261242_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/201308271618_IDEMPIERE-1160.sql b/migration/i1.0c-release/oracle/201308271618_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..a997342d5c --- /dev/null +++ b/migration/i1.0c-release/oracle/201308271618_IDEMPIERE-1160.sql @@ -0,0 +1,27 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Aug 27, 2013 4:17:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users / Web Service Security Window +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2013-08-27 16:17:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53187 +; + +-- Aug 27, 2013 4:17:45 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2013-08-27 16:17:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53188 +; + +-- Aug 27, 2013 4:17:48 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2013-08-27 16:17:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53189 +; + +-- Aug 27, 2013 4:17:52 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2013-08-27 16:17:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + +-- Aug 27, 2013 4:17:57 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2013-08-27 16:17:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53191 +; + +SELECT register_migration_script('201308271618_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201308201752_IDEMPIERE-1263.sql b/migration/i1.0c-release/postgresql/201308201752_IDEMPIERE-1263.sql new file mode 100644 index 0000000000..ce92a13d2e --- /dev/null +++ b/migration/i1.0c-release/postgresql/201308201752_IDEMPIERE-1263.sql @@ -0,0 +1,18 @@ +-- Aug 20, 2013 5:51:40 PM COT +-- IDEMPIERE-1263 can set "Reservation Locator" of a warehouse by locator of other warehouse +INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Description,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID,AD_Client_ID) VALUES ('M_Locator.M_Warehouse_ID=@0|M_Warehouse_ID@',200053,'D','M_ReserveLocator Tab 0','Where the warehouse field is at tab level 0','S','7086e2fa-88d8-4534-a9f7-3ac151ef840b',100,100,TO_TIMESTAMP('2013-08-20 17:51:38','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-08-20 17:51:38','YYYY-MM-DD HH24:MI:SS'),'Y',0,0) +; + +-- Aug 20, 2013 5:52:08 PM COT +-- IDEMPIERE-1263 can set "Reservation Locator" of a warehouse by locator of other warehouse +UPDATE AD_Column SET AD_Val_Rule_ID=200053,Updated=TO_TIMESTAMP('2013-08-20 17:52:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200704 +; + +-- Aug 26, 2013 11:46:23 AM COT +-- IDEMPIERE-1263 can set Reservation Locator of a warehouse by locator of other warehouse +UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-08-26 11:46:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200649 +; + +SELECT register_migration_script('201308201752_IDEMPIERE-1263.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201308260558_IDEMPIERE-1298.sql b/migration/i1.0c-release/postgresql/201308260558_IDEMPIERE-1298.sql index 5301472d0f..ce2632bbba 100644 --- a/migration/i1.0c-release/postgresql/201308260558_IDEMPIERE-1298.sql +++ b/migration/i1.0c-release/postgresql/201308260558_IDEMPIERE-1298.sql @@ -181,11 +181,6 @@ INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Colu INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210844 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; --- Aug 23, 2013 6:27:33 PM MYT --- IDEMPIERE-1298 2Pack: Support copying of data from one client to another -CREATE TABLE AD_Package_UUID_Map (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Package_UUID_Map_ID NUMERIC(10) NOT NULL, AD_Package_UUID_Map_UU VARCHAR(36) NOT NULL, AD_Table_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Source_UUID VARCHAR(36) NOT NULL, Target_UUID VARCHAR(36) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_Package_UUID_Map_Key PRIMARY KEY (AD_Package_UUID_Map_ID)) -; - -- Aug 23, 2013 6:27:55 PM MYT -- IDEMPIERE-1298 2Pack: Support copying of data from one client to another UPDATE AD_Column SET IsKey='N',Updated=TO_TIMESTAMP('2013-08-23 18:27:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=210835 diff --git a/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql b/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..6d8ff35dbb --- /dev/null +++ b/migration/i1.0c-release/postgresql/201308261242_IDEMPIERE-1160.sql @@ -0,0 +1,8 @@ +-- Aug 26, 2013 12:41:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users +UPDATE AD_Field SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2013-08-26 12:41:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56486 +; + +SELECT register_migration_script('201308261242_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201308271618_IDEMPIERE-1160.sql b/migration/i1.0c-release/postgresql/201308271618_IDEMPIERE-1160.sql new file mode 100644 index 0000000000..633d4b646d --- /dev/null +++ b/migration/i1.0c-release/postgresql/201308271618_IDEMPIERE-1160.sql @@ -0,0 +1,24 @@ +-- Aug 27, 2013 4:17:41 PM COT +-- IDEMPIERE-1160 Hide potentially dangerous stuff from non-admin users / Web Service Security Window +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2013-08-27 16:17:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53187 +; + +-- Aug 27, 2013 4:17:45 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2013-08-27 16:17:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53188 +; + +-- Aug 27, 2013 4:17:48 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2013-08-27 16:17:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53189 +; + +-- Aug 27, 2013 4:17:52 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2013-08-27 16:17:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + +-- Aug 27, 2013 4:17:57 PM COT +UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2013-08-27 16:17:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53191 +; + +SELECT register_migration_script('201308271618_IDEMPIERE-1160.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index bca31c10c4..2e6a636c8e 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -455,6 +455,7 @@ public abstract class Convert File fileNameOr = File.createTempFile("migration_script_", "_oracle.sql"); tempFileOr = new FileOutputStream(fileNameOr, true); writerOr = new BufferedWriter(new OutputStreamWriter(tempFileOr, "UTF8")); + writerOr.append("SET SQLBLANKLINES ON\nSET DEFINE OFF\n\n"); } writeLogMigrationScript(writerOr, oraStatement); } catch (IOException e) { diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 5a98228d7f..1713c1347c 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -226,6 +226,7 @@ public final class MSetup admin.setUserLevel(MRole.USERLEVEL_ClientPlusOrganization); admin.setPreferenceType(MRole.PREFERENCETYPE_Client); admin.setIsShowAcct(true); + admin.setIsAccessAdvanced(true); if (!admin.save()) { String err = "Admin Role A NOT inserted"; @@ -252,6 +253,7 @@ public final class MSetup MRole user = new MRole (m_ctx, 0, m_trx.getTrxName()); user.setClientOrg(m_client); user.setName(name); + user.setIsAccessAdvanced(false); if (!user.save()) { String err = "User Role A NOT inserted"; diff --git a/org.adempiere.base/src/org/compiere/util/Env.java b/org.adempiere.base/src/org/compiere/util/Env.java index 359fe48646..d11bd64a0d 100644 --- a/org.adempiere.base/src/org/compiere/util/Env.java +++ b/org.adempiere.base/src/org/compiere/util/Env.java @@ -1474,18 +1474,29 @@ public final class Env } else if (po != null) { //take from po Object v = po.get_Value(token); + MColumn colToken = MColumn.get(ctx, po.get_TableName(), token); + String foreignTable = colToken.getReferenceTableName(); if (v != null) { if (format != null && format.length() > 0) { - if (v instanceof Integer && token.endsWith("_ID")) { + if (v instanceof Integer && (Integer) v > 0 && token.endsWith("_ID")) { int tblIndex = format.indexOf("."); - String table = tblIndex > 0 ? format.substring(0, tblIndex) : token.substring(0, token.length() - 3); - String column = tblIndex > 0 ? format.substring(tblIndex + 1) : format; - MColumn col = MColumn.get(ctx, table, column); - if (col != null && col.isSecure()) { - outStr.append("********"); - } else { - outStr.append(DB.getSQLValueString(trxName, - "SELECT " + column + " FROM " + table + " WHERE " + table + "_ID = ?", (Integer)v)); + String tableName = null; + if (tblIndex > 0) + tableName = format.substring(0, tblIndex); + else + tableName = foreignTable; + MTable table = MTable.get(ctx, tableName); + if (table != null && tableName.equalsIgnoreCase(foreignTable)) { + String columnName = tblIndex > 0 ? format.substring(tblIndex + 1) : format; + MColumn column = table.getColumn(columnName); + if (column != null) { + if (column.isSecure()) { + outStr.append("********"); + } else { + outStr.append(DB.getSQLValueString(trxName, + "SELECT " + columnName + " FROM " + tableName + " WHERE " + tableName + "_ID = ?", (Integer)v)); + } + } } } else if (v instanceof Date) { SimpleDateFormat df = new SimpleDateFormat(format); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java index 0cdcd84409..99cb5cdc91 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java @@ -291,7 +291,7 @@ public class WPaymentEditor extends WEditor implements ListDataListener { { int windowNo = lookup == null ? 0 : lookup.getWindowNo(); Object newValue = getValue(); - if (newValue != null) + if (newValue != null && getGridField().getGridTab() != null) { final IPaymentForm pf = WPaymentFormFactory.create(windowNo, getGridField().getGridTab(), (String) newValue); if (pf != null)