From e2b9f877ee5437779b2272a9d7eb4bbffd18a1b4 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 30 Oct 2013 12:15:42 -0500 Subject: [PATCH] IDEMPIERE-1443 leadconversion - can't translate --- .../oracle/201310301212_IDEMPIERE-1443.sql | 16 ++++++++++++++++ .../postgresql/201310301212_IDEMPIERE-1443.sql | 13 +++++++++++++ .../src/org/compiere/process/ConvertLead.java | 10 ++++------ 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 migration/i1.0c-release/oracle/201310301212_IDEMPIERE-1443.sql create mode 100644 migration/i1.0c-release/postgresql/201310301212_IDEMPIERE-1443.sql diff --git a/migration/i1.0c-release/oracle/201310301212_IDEMPIERE-1443.sql b/migration/i1.0c-release/oracle/201310301212_IDEMPIERE-1443.sql new file mode 100644 index 0000000000..d99a75dbd8 --- /dev/null +++ b/migration/i1.0c-release/oracle/201310301212_IDEMPIERE-1443.sql @@ -0,0 +1,16 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- 30/10/2013 12:11:00 PM COT +-- IDEMPIERE-1443 leadconversion - can't translate +UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_DATE('2013-10-30 12:11:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137 +; + +-- 30/10/2013 12:12:23 PM COT +-- IDEMPIERE-1443 leadconversion - can't translate +UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_DATE('2013-10-30 12:12:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62149 +; + +SELECT register_migration_script('201310301212_IDEMPIERE-1443.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201310301212_IDEMPIERE-1443.sql b/migration/i1.0c-release/postgresql/201310301212_IDEMPIERE-1443.sql new file mode 100644 index 0000000000..37a34df330 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201310301212_IDEMPIERE-1443.sql @@ -0,0 +1,13 @@ +-- 30/10/2013 12:11:00 PM COT +-- IDEMPIERE-1443 leadconversion - can't translate +UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2013-10-30 12:11:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137 +; + +-- 30/10/2013 12:12:23 PM COT +-- IDEMPIERE-1443 leadconversion - can't translate +UPDATE AD_Field SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2013-10-30 12:12:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62149 +; + +SELECT register_migration_script('201310301212_IDEMPIERE-1443.sql') FROM dual +; + diff --git a/org.adempiere.base.process/src/org/compiere/process/ConvertLead.java b/org.adempiere.base.process/src/org/compiere/process/ConvertLead.java index 997ee05d1d..7937b63165 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ConvertLead.java +++ b/org.adempiere.base.process/src/org/compiere/process/ConvertLead.java @@ -68,7 +68,7 @@ public class ConvertLead extends SvrProcess { bp.setName(lead.getName()); bp.saveEx(); - addLog("Business Partner created."); + addLog(bp.getC_BPartner_ID(), null, null, "@C_BPartner_ID@ @Created@", MBPartner.Table_ID, bp.getC_BPartner_ID()); lead.setC_BPartner_ID(bp.getC_BPartner_ID()); @@ -88,7 +88,7 @@ public class ConvertLead extends SvrProcess { lead.setC_BPartner_Location_ID(loc.getC_BPartner_Location_ID()); - addLog("Contact Location added."); + addLog("@C_BPartner_Location_ID@ @Created@"); } // company address @@ -103,7 +103,7 @@ public class ConvertLead extends SvrProcess { loc.setC_Location_ID(address.getC_Location_ID()); loc.saveEx(); - addLog("BP Address added."); + addLog("@C_Location_ID@ @Created@"); } if (p_createOpportunity ) @@ -139,15 +139,13 @@ public class ConvertLead extends SvrProcess { op.saveEx(); - addLog("Opportunity created."); + addLog(op.getC_Opportunity_ID(), null, null, "@C_Opportunity_ID@ @Created@", MOpportunity.Table_ID, op.getC_Opportunity_ID()); } lead.setIsSalesLead(false); lead.setLeadStatus(MUser.LEADSTATUS_Converted); lead.saveEx(); - addLog("Lead converted."); - return "@OK@"; }