From 833c03ddc0123359166ecdeda20ff292895bea55 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Feb 2015 10:16:19 -0500 Subject: [PATCH] IDEMPIERE-2447 Migration script from packin adding unnecessary updates --- .../src/org/compiere/dbPort/Convert.java | 12 ++++++------ .../src/org/adempiere/pipo2/PoFiller.java | 8 +++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index 9b314fe0f8..eec01ba7b0 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -577,12 +577,6 @@ public abstract class Convert prm_COMMENT = MSysConfig.getValue(MSysConfig.PROJECT_ID_COMMENTS); else prm_COMMENT = MSysConfig.getValue(MSysConfig.DICTIONARY_ID_COMMENTS); - // log time and date - SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.DateTime); - String dateTimeText = format.format(new Timestamp(System.currentTimeMillis())); - w.append("-- "); - w.append(dateTimeText); - w.append("\n"); if (prm_COMMENT != null && ! m_oldprm_COMMENT.equals(prm_COMMENT)) { // log sysconfig comment w.append("-- "); @@ -591,6 +585,12 @@ public abstract class Convert if (w == writerPg) m_oldprm_COMMENT = prm_COMMENT; } + // log time and date + SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.DateTime); + String dateTimeText = format.format(new Timestamp(System.currentTimeMillis())); + w.append("-- "); + w.append(dateTimeText); + w.append("\n"); // log statement w.append(statement); // close statement diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index f69f718da3..39f4d16b35 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -195,14 +195,16 @@ public class PoFiller{ String sAD_Client_ID = clientElement != null ? clientElement.contents.toString() : null; if (sAD_Client_ID != null && sAD_Client_ID.equals("0")) { - po.set_ValueNoCheck("AD_Client_ID", 0); - po.setAD_Org_ID(0); + if (po.getAD_Client_ID() != 0) + po.set_ValueNoCheck("AD_Client_ID", 0); + if (po.getAD_Org_ID() != 0) + po.setAD_Org_ID(0); } else { Element orgElement = element.properties.get("AD_Org_ID"); String sAD_Org_ID = orgElement != null ? orgElement.contents.toString() : null; - if (sAD_Org_ID != null && sAD_Org_ID.equals("0")) + if (sAD_Org_ID != null && sAD_Org_ID.equals("0") && po.getAD_Org_ID() != 0) po.setAD_Org_ID(0); else if (sAD_Org_ID != null && sAD_Org_ID.equals("@AD_Org_ID@")) po.setAD_Org_ID(Env.getAD_Org_ID(ctx.ctx));