details: /erp/stable/2.50/rev/bc8ed469f456
changeset: 9362:bc8ed469f456
user: David Alsasua <david.alsasua <at> openbravo.com>
date: Tue Apr 12 15:01:10 2011 +0200
summary: Reformatted file. No code change
details: /erp/stable/2.50/rev/332d1690cfa8
changeset: 9363:332d1690cfa8
user: David Alsasua <david.alsasua <at> openbravo.com>
date: Tue Apr 12 15:01:41 2011 +0200
summary: Fixes issue 16758.
Re-readding the client object
diffstat:
src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java | 38
+++++-----
1 files changed, 19 insertions(+), 19 deletions(-)
diffs (97 lines):
diff -r ded05ae3dc61 -r 332d1690cfa8
src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java
--- a/src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java Tue Apr
12 18:45:46 2011 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java Tue Apr
12 15:01:41 2011 +0200
@@ -152,10 +152,11 @@
OBDal.getInstance().flush();
OBDal.getInstance().commitAndClose();
org = OBDal.getInstance().get(Organization.class, strOrgId);
+ client = org.getClient();
if (strcLocationId != null && !strcLocationId.equals(""))
try {
- InitialSetupUtility.updateOrgLocation(org,
- OBDal.getInstance().get(Location.class, strcLocationId));
+ InitialSetupUtility.updateOrgLocation(org,
OBDal.getInstance().get(Location.class,
+ strcLocationId));
} catch (final Exception err) {
return logErrorAndRollback(
"@CreateOrgFailed@",
@@ -258,9 +259,9 @@
try {
log4j.debug("createReferenceData() - There exists accounting modules
to process");
obeResult = insertAccountingModule(strSourcePath, strModules,
partner, product, project,
- campaign, salesRegion,
- InitialSetupUtility.getTranslatedColumnName(language,
"Account_ID"),
- InitialSetupUtility.getTranslatedColumnName(language,
"C_Calendar_ID"), strCurrency);
+ campaign, salesRegion,
InitialSetupUtility.getTranslatedColumnName(language,
+ "Account_ID"),
InitialSetupUtility.getTranslatedColumnName(language,
+ "C_Calendar_ID"), strCurrency);
if (!obeResult.getType().equals(OKTYPE))
return obeResult;
log4j.debug("createReferenceData() - Accounting module processed. ");
@@ -498,17 +499,16 @@
try {
istrFileCoA = fileCoAFilePath.getInputStream();
} catch (IOException e) {
- return logErrorAndRollback(
- "@CreateAccountingFailed@",
+ return logErrorAndRollback("@CreateAccountingFailed@",
"createAccounting() - Exception occured while reading the file "
+ fileCoAFilePath.getName(), e);
}
try {
obResult = coaUtility.createAccounting(vars, istrFileCoA, partner,
product, project,
- campaign, salesRegion,
- InitialSetupUtility.getTranslatedColumnName(language, "Account_ID"),
"US", "A",
- InitialSetupUtility.getTranslatedColumnName(language,
"C_Calendar_ID"),
- InitialSetupUtility.getCurrency(strCurrency));
+ campaign, salesRegion, InitialSetupUtility
+ .getTranslatedColumnName(language, "Account_ID"), "US", "A",
InitialSetupUtility
+ .getTranslatedColumnName(language, "C_Calendar_ID"),
InitialSetupUtility
+ .getCurrency(strCurrency));
if (!obResult.getType().equals(OKTYPE))
return obResult;
} catch (final Exception err) {
@@ -529,8 +529,8 @@
if (client.getClientInformationList().get(0).getYourCompanyDocumentImage()
!= null)
try {
InitialSetupUtility.setOrgImage(client, org,
client.getClientInformationList().get(0)
- .getYourCompanyDocumentImage().getBindaryData(),
-
client.getClientInformationList().get(0).getYourCompanyDocumentImage().getName());
+ .getYourCompanyDocumentImage().getBindaryData(),
client.getClientInformationList().get(
+ 0).getYourCompanyDocumentImage().getName());
} catch (final Exception err) {
obResult.setMessage(err.getMessage());
return obResult;
@@ -579,8 +579,8 @@
log4j.debug("insertUser() - Organization User Name: " + strOrgUser);
try {
- user = InitialSetupUtility.insertUser(client, null, strOrgUser,
- FormatUtilities.sha1Base64(strPassword), null, language);
+ user = InitialSetupUtility.insertUser(client, null, strOrgUser,
FormatUtilities
+ .sha1Base64(strPassword), null, language);
} catch (final Exception err) {
return logErrorAndRollback("@CreateOrgFailed@",
"insertUser() - ERROR - Not able to insert the user " + strOrgUser,
err);
@@ -670,8 +670,8 @@
}
try {
- InitialSetupUtility.updateOrgTree(orgTree, orgNode,
- OBDal.getInstance().get(Organization.class, strParentOrg));
+ InitialSetupUtility.updateOrgTree(orgTree, orgNode,
OBDal.getInstance().get(
+ Organization.class, strParentOrg));
} catch (final Exception err) {
return logErrorAndRollback(
"@CreateOrgFailed@",
@@ -688,8 +688,8 @@
}
public String getLog() {
- return strHeaderLog.append(NEW_LINE).append(STRSEPARATOR).append(NEW_LINE
+ NEW_LINE)
- .append(strLog).toString();
+ return strHeaderLog.append(NEW_LINE).append(STRSEPARATOR).append(NEW_LINE
+ NEW_LINE).append(
+ strLog).toString();
}
/**
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits