From 6a9cdbe97771fab4ad198a6f4c84ef58a4ffb57e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 7 Mar 2013 17:41:12 -0500 Subject: [PATCH 1/4] IDEMPIERE-708 Postgresql ERROR: date/time value "current" is no longer supported --- .../src/org/compiere/process/ColumnSync.java | 2 +- .../src/org/compiere/dbPort/ConvertMap_PostgreSQL.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java index 7e54fca391..1035c2d5a3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java @@ -133,7 +133,7 @@ public class ColumnSync extends SvrProcess String statements[] = sql.split(DB.SQLSTATEMENT_SEPARATOR); for (int i = 0; i < statements.length; i++) { - int count = DB.executeUpdate(statements[i], false, get_TrxName()); + int count = DB.executeUpdateEx(statements[i], get_TrxName()); addLog (0, null, new BigDecimal(count), statements[i]); no += count; } diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/ConvertMap_PostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/ConvertMap_PostgreSQL.java index 8a387607fd..56b95b6b67 100644 --- a/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/ConvertMap_PostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/dbPort/ConvertMap_PostgreSQL.java @@ -63,11 +63,11 @@ public final class ConvertMap_PostgreSQL { s_pg.put("\\bBITMAP INDEX\\b", "INDEX"); // Functions - s_pg.put("\\bSYSDATE\\b", "CURRENT_TIMESTAMP"); // alternative: NOW() + s_pg.put("\\bSYSDATE\\b", "now()"); //begin vpj-cd e-evolution 03/11/2005 PostgreSQL s_pg.put("\\bDUMP\\b", "MD5"); s_pg.put("END CASE", "END"); - s_pg.put("\\bgetDate\\b\\(\\)", "CURRENT_TIMESTAMP"); // alternative: NOW() + s_pg.put("\\bgetDate\\b\\(\\)", "now()"); //end vpj-cd e-evolution 03/11/2005 PostgreSQL s_pg.put("\\bNVL\\b", "COALESCE"); s_pg.put("\\bTO_DATE\\b", "TO_TIMESTAMP"); From 41398ec88c04dafa07b841cdf5447e96db2d8f3b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 7 Mar 2013 17:51:20 -0500 Subject: [PATCH 2/4] IDEMPIERE-626 Zk: Ticket #1002211: Context help pane / add defaults to created/updated columns - add missing translations broken --- .../oracle/201303071741_IDEMPIERE-626.sql | 33 +++++++++++++++++++ .../postgresql/201303071741_IDEMPIERE-626.sql | 33 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 migration/i1.0a-release/oracle/201303071741_IDEMPIERE-626.sql create mode 100644 migration/i1.0a-release/postgresql/201303071741_IDEMPIERE-626.sql diff --git a/migration/i1.0a-release/oracle/201303071741_IDEMPIERE-626.sql b/migration/i1.0a-release/oracle/201303071741_IDEMPIERE-626.sql new file mode 100644 index 0000000000..7e85d78090 --- /dev/null +++ b/migration/i1.0a-release/oracle/201303071741_IDEMPIERE-626.sql @@ -0,0 +1,33 @@ +-- Mar 7, 2013 5:39:23 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_Column SET DefaultValue='SYSDATE',Updated=TO_DATE('2013-03-07 17:39:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208572 +; + +-- Mar 7, 2013 5:39:58 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +ALTER TABLE AD_CtxHelpMsg_Trl MODIFY Created DATE DEFAULT SYSDATE +; + +-- Mar 7, 2013 5:40:04 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_CtxHelpMsg_Trl SET Created=SYSDATE WHERE Created IS NULL +; + +-- Mar 7, 2013 5:45:58 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_Column SET DefaultValue='SYSDATE',Updated=TO_DATE('2013-03-07 17:45:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208578 +; + +-- Mar 7, 2013 5:46:09 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +ALTER TABLE AD_CtxHelpMsg_Trl MODIFY Updated DATE DEFAULT SYSDATE +; + +-- Mar 7, 2013 5:46:09 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_CtxHelpMsg_Trl SET Updated=SYSDATE WHERE Updated IS NULL +; + +SELECT register_migration_script('201303071741_IDEMPIERE-626.sql') FROM dual +; + diff --git a/migration/i1.0a-release/postgresql/201303071741_IDEMPIERE-626.sql b/migration/i1.0a-release/postgresql/201303071741_IDEMPIERE-626.sql new file mode 100644 index 0000000000..5f57b28308 --- /dev/null +++ b/migration/i1.0a-release/postgresql/201303071741_IDEMPIERE-626.sql @@ -0,0 +1,33 @@ +-- Mar 7, 2013 5:39:23 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_Column SET DefaultValue='SYSDATE',Updated=TO_TIMESTAMP('2013-03-07 17:39:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208572 +; + +-- Mar 7, 2013 5:39:58 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +INSERT INTO t_alter_column values('ad_ctxhelpmsg_trl','Created','TIMESTAMP',null,'now()') +; + +-- Mar 7, 2013 5:40:04 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_CtxHelpMsg_Trl SET Created=now() WHERE Created IS NULL +; + +-- Mar 7, 2013 5:45:58 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_Column SET DefaultValue='SYSDATE',Updated=TO_TIMESTAMP('2013-03-07 17:45:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208578 +; + +-- Mar 7, 2013 5:46:09 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +INSERT INTO t_alter_column values('ad_ctxhelpmsg_trl','Updated','TIMESTAMP',null,'now()') +; + +-- Mar 7, 2013 5:46:09 PM COT +-- IDEMPIERE-626 Zk: Ticket #1002211: Context help pane +UPDATE AD_CtxHelpMsg_Trl SET Updated=now() WHERE Updated IS NULL +; + +SELECT register_migration_script('201303071741_IDEMPIERE-626.sql') FROM dual +; + From 811111d25765a3ec453b652d4d0e6346e9dd5dcc Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 7 Mar 2013 23:19:25 -0500 Subject: [PATCH 3/4] IDEMPIERE-655 No report without printformat window access / Correct wrong usage of == on objects --- org.adempiere.ui.swing/src/org/compiere/print/Viewer.java | 2 +- .../src/org/adempiere/webui/panel/action/ReportAction.java | 2 +- .../WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java index f045fa457f..5642a18435 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -467,7 +467,7 @@ public class Viewer extends CFrame } // IDEMPIERE-297 - Check for Table Access and Window Access for New Report if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) - && (MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE)) + && (Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT)))) { StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **"); KeyNamePair pp = new KeyNamePair(-1, sb.toString()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java index 234eb3068f..891b4e1fab 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java @@ -404,7 +404,7 @@ public class ReportAction implements EventListener log.log(Level.SEVERE, e.getLocalizedMessage(), e); } - if (MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) && MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE) + if (MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) && Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))) { StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **"); pp = new KeyNamePair(-1, sb.toString()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index fcb4ea6ce7..d93d7c5ab4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -606,7 +606,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab } // IDEMPIERE-297 - Check for Table Access and Window Access for New Report if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) - && MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE) + && Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))) { StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **"); KeyNamePair pp = new KeyNamePair(-1, sb.toString()); From 3cbcf56110bc9143e3998c059b9facb8b1d47ab0 Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Thu, 7 Mar 2013 23:21:48 -0500 Subject: [PATCH 4/4] IDEMPIERE-680 Dont see button in the pop up of report wizard --- .../webui/apps/form/WReportCustomization.java | 48 ++++++++----------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java index 56f82387aa..1795be60a4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java @@ -31,7 +31,6 @@ import org.adempiere.webui.component.Tab; import org.adempiere.webui.component.Tabbox; import org.adempiere.webui.component.Tabpanels; import org.adempiere.webui.component.Tabs; -import org.adempiere.webui.component.ToolBarButton; import org.adempiere.webui.component.Window; import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.panel.CustomForm; @@ -91,9 +90,9 @@ public class WReportCustomization implements IFormController,EventListener