IDEMPIERE-2565 - found transaction not rolled back when initial client setup was failing with an exception
This commit is contained in:
parent
da2fd9fffb
commit
267fe358df
|
@ -257,7 +257,7 @@ public class InitialClientSetup extends SvrProcess
|
|||
|
||||
// Process
|
||||
MSetup ms = new MSetup(Env.getCtx(), WINDOW_THIS_PROCESS);
|
||||
|
||||
try {
|
||||
if (! ms.createClient(p_ClientName, p_OrgValue, p_OrgName, p_AdminUserName, p_NormalUserName
|
||||
, p_Phone, p_Phone2, p_Fax, p_EMail, p_TaxID, p_AdminUserEmail, p_NormalUserEmail)) {
|
||||
ms.rollback();
|
||||
|
@ -285,6 +285,10 @@ public class InitialClientSetup extends SvrProcess
|
|||
|
||||
// Create Print Documents
|
||||
PrintUtil.setupPrintForm(ms.getAD_Client_ID());
|
||||
} catch (Exception e) {
|
||||
ms.rollback();
|
||||
throw e;
|
||||
}
|
||||
|
||||
return "@OK@";
|
||||
}
|
||||
|
|
|
@ -465,7 +465,7 @@ public class MLocation extends X_C_Location implements Comparator<Object>
|
|||
if (c == null)
|
||||
return "CountryNotFound";
|
||||
|
||||
boolean local = getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID();
|
||||
boolean local = MCountry.getDefault(getCtx()) != null && getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID();
|
||||
String inStr = local ? c.getDisplaySequenceLocal() : c.getDisplaySequence();
|
||||
StringBuilder outStr = new StringBuilder();
|
||||
|
||||
|
|
Loading…
Reference in New Issue