From 32b7640889cc3e72b4e08b27979c89bc83783fb9 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Tue, 3 Sep 2013 17:21:51 +0800 Subject: [PATCH] IDEMPIERE-1286 Improve address validation configuration to support external services --- .../src/org/compiere/model/MAddressTransaction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MAddressTransaction.java b/org.adempiere.base/src/org/compiere/model/MAddressTransaction.java index 91c6fd1bd0..6bcb8f2aa5 100644 --- a/org.adempiere.base/src/org/compiere/model/MAddressTransaction.java +++ b/org.adempiere.base/src/org/compiere/model/MAddressTransaction.java @@ -82,7 +82,7 @@ public class MAddressTransaction extends X_C_AddressTransaction { setErrorMessage(null); - boolean processed = false; + boolean processed = false; try { IAddressValidation validation = Core.getAddressValidation(getMAddressValidation()); @@ -91,7 +91,7 @@ public class MAddressTransaction extends X_C_AddressTransaction else { processed = validation.onlineValidate(getCtx(), this, get_TrxName()); - if (!processed) + if (!processed || !isValid()) setErrorMessage("From " + getMAddressValidation().getName() + ": " + getResult()); } } @@ -104,7 +104,7 @@ public class MAddressTransaction extends X_C_AddressTransaction MOnlineTrxHistory history = new MOnlineTrxHistory(getCtx(), 0, get_TrxName()); history.setAD_Table_ID(MAddressTransaction.Table_ID); history.setRecord_ID(getC_AddressTransaction_ID()); - history.setIsError(!processed); + history.setIsError(!(processed && isValid())); history.setProcessed(processed); StringBuilder msg = new StringBuilder();