details: /erp/devel/int/rev/8abd2ad43256
changeset: 6957:8abd2ad43256
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Apr 08 14:10:42 2010 +0200
summary: Buy out option for OBPS instances
details: /erp/devel/int/rev/6c6935b5ba06
changeset: 6958:6c6935b5ba06
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Apr 08 15:41:50 2010 +0200
summary: fixed issue 10068: URL links doesn't work if they contain protocol
details: /erp/devel/int/rev/f806ff1950f4
changeset: 6959:f806ff1950f4
user: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
date: Thu Apr 08 19:54:51 2010 +0530
summary: Fixes Issue 12899: Amortization lines are not displayed in sequence
of year
details: /erp/devel/int/rev/695c4b4aee08
changeset: 6960:695c4b4aee08
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Apr 08 18:08:45 2010 +0200
summary: fixed bug 12364: JS messages not working together with modules
diffstat:
src-db/database/model/functions/A_ASSET_POST.xml | 5 +-
src-db/database/sourcedata/AD_TEXTINTERFACES.xml | 11 ++
src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html | 7 +-
src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java | 30 +++++--
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java | 18 ++--
src/org/openbravo/erpCommon/modules/ModuleTree.java | 35 ++++++--
src/org/openbravo/erpCommon/modules/ModuleTreeDescription.srpt | 4 +-
src/org/openbravo/erpCommon/modules/ModuleTree_data.xsql | 4 +-
src/org/openbravo/erpCommon/obps/ActivationKey.java | 39 +++++++--
web/js/messages.js | 11 ++-
10 files changed, 114 insertions(+), 50 deletions(-)
diffs (truncated from 420 to 300 lines):
diff -r c56bf3953565 -r 695c4b4aee08
src-db/database/model/functions/A_ASSET_POST.xml
--- a/src-db/database/model/functions/A_ASSET_POST.xml Thu Apr 08 09:47:48
2010 +0200
+++ b/src-db/database/model/functions/A_ASSET_POST.xml Thu Apr 08 18:08:45
2010 +0200
@@ -207,9 +207,8 @@
LOOP
SELECT COALESCE(MAX(SEQ_NO_ASSET), 0) +10
INTO v_SEQ_ASSET
- FROM A_AMORTIZATIONLINE, A_ASSET
- WHERE A_AMORTIZATIONLINE.A_ASSET_ID = A_ASSET.A_ASSET_ID
- AND A_ASSET.A_ASSET_ID=v_Record_ID;
+ FROM A_AMORTIZATIONLINE
+ WHERE A_AMORTIZATIONLINE.A_ASSET_ID = v_Record_ID;
IF(v_COUNT=1 AND to_number(v_BEGINING_DATE-v_FIRST_DAY_DATE)<>0)
THEN
v_Percentage:=to_number(to_number(TO_DATE('31-12-'||to_char(v_AMORTIZATIONSTARTDATE,
'YYYY'), 'DD-MM-YYYY') -v_AMORTIZATIONSTARTDATE)
/(TO_DATE('31-12-'||to_char(v_AMORTIZATIONSTARTDATE, 'YYYY'), 'DD-MM-YYYY')
-TO_DATE('01-01-'||to_char(v_AMORTIZATIONSTARTDATE, 'YYYY'), 'DD-MM-YYYY'))) *
v_PercentageGeneral;
v_USELIFEYEARS:=v_USELIFEYEARS+1;
diff -r c56bf3953565 -r 695c4b4aee08
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Thu Apr 08 09:47:48
2010 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Thu Apr 08 18:08:45
2010 +0200
@@ -20663,6 +20663,17 @@
<!--83A34A4C0D067671E040007F010125A3-->
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
<!--83A34A4C0D067671E040007F010125A3--></AD_TEXTINTERFACES>
+<!--83B5190C0B3C56C7E040007F01013254--><AD_TEXTINTERFACES>
+<!--83B5190C0B3C56C7E040007F01013254-->
<AD_TEXTINTERFACES_ID><![CDATA[83B5190C0B3C56C7E040007F01013254]]></AD_TEXTINTERFACES_ID>
+<!--83B5190C0B3C56C7E040007F01013254-->
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--83B5190C0B3C56C7E040007F01013254--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--83B5190C0B3C56C7E040007F01013254--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--83B5190C0B3C56C7E040007F01013254--> <TEXT><![CDATA[Subscription
Converted]]></TEXT>
+<!--83B5190C0B3C56C7E040007F01013254-->
<FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/InstanceManagement.html]]></FILENAME>
+<!--83B5190C0B3C56C7E040007F01013254--> <ISUSED><![CDATA[Y]]></ISUSED>
+<!--83B5190C0B3C56C7E040007F01013254-->
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--83B5190C0B3C56C7E040007F01013254--></AD_TEXTINTERFACES>
+
<!--8774D7A6B6394D45BCDBF20FE4B98832--><AD_TEXTINTERFACES>
<!--8774D7A6B6394D45BCDBF20FE4B98832-->
<AD_TEXTINTERFACES_ID><![CDATA[8774D7A6B6394D45BCDBF20FE4B98832]]></AD_TEXTINTERFACES_ID>
<!--8774D7A6B6394D45BCDBF20FE4B98832-->
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html
--- a/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html Thu Apr
08 09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.html Thu Apr
08 18:08:45 2010 +0200
@@ -13,7 +13,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2009 Openbravo SLU
+ * All portions are Copyright (C) 2009-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -262,9 +262,12 @@
<td class="TitleCell">
<span class="LabelText">Subscription Status</span>
</td>
- <td id="OPSActive" colspan="5" class="TitleCell"
style="text-align:left;">
+ <td id="OPSActiveTitle" colspan="5" class="TitleCell"
style="text-align:left;">
<span class="Label_ReadOnly_Text" id="subStatus"><span
style="color:green;" id="subStatus_active">Active</span>.<span
id="OPSExpirationTime"> You have <span
id="OPSdaysLeft">xx</span> days left before your <a
class="LabelLink_noicon" href="http://www.openbravo.com/network"
target="_blank">Openbravo Professional
Subscription</a> expires.</span></span>
</td>
+ <td id="OPSConverted" colspan="5" class="TitleCell"
style="text-align:left;">
+ <span class="Label_ReadOnly_Text" id="subStatus"><span
style="color:orange;" id="subStatus_active">Subscription
Converted</span>.</span>
+ </td>
<td id="OPSNoActiveYet" colspan="5" class="TitleCell"
style="text-align:left;">
<span class="Label_ReadOnly_Text" id="subStatus"><span
style="color:red;" id="subStatus_unactive">No Active Yet</span>.</span>
</td>
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java Thu Apr
08 09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java Thu Apr
08 18:08:45 2010 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2009 Openbravo SLU
+ * All portions are Copyright (C) 2009-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -181,27 +181,38 @@
private void printPageActive(HttpServletResponse response,
VariablesSecureApp vars,
ActivationKey activationKey) throws IOException, ServletException {
response.setContentType("text/html; charset=UTF-8");
- String discard[] = { "", "", "", "" };
+ String discard[] = { "", "", "", "", "", "" };
if (activationKey.isOPSInstance()) {
discard[0] = "CEInstance";
- if (activationKey.hasExpired()) {
- discard[1] = "OPSActive";
+ if (activationKey.isSubscriptionConverted()) {
+ discard[1] = "OPSActiveTitle";
+ discard[2] = "OPSExpired";
+ discard[3] = "OPSNoActiveYet";
+ } else if (activationKey.hasExpired()) {
+ discard[1] = "OPSActiveTitle";
discard[2] = "OPSNoActiveYet";
+ discard[3] = "OPSConverted";
+ discard[4] = "OPSActive";
} else if (activationKey.isNotActiveYet()) {
discard[1] = "OPSExpired";
- discard[2] = "OPSActive";
+ discard[2] = "OPSActiveTitle";
+ discard[3] = "OPSConverted";
+ discard[4] = "OPSActive";
} else {
discard[1] = "OPSExpired";
if (!activationKey.hasExpirationDate()) {
discard[2] = "OPSExpirationTime";
}
- discard[3] = "OPSNoActiveYet";
+ discard[3] = "OPSConverted";
+ discard[4] = "OPSNoActiveYet";
}
} else {
discard[0] = "OPSInstance";
- discard[1] = "OPSActive";
+ discard[1] = "OPSActiveTitle";
discard[2] = "OPSExpired";
- discard[3] = "OPSNoActiveYet";
+ discard[3] = "OPSConverted";
+ discard[4] = "OPSNoActiveYet";
+ discard[5] = "OPSActive";
}
XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
@@ -265,7 +276,8 @@
vars.getLanguage()).replace("\\n", "\n"));
}
- String cacheMsg = Utility.messageBD(this, "OUTDATED_FILES_CACHED",
vars.getLanguage()).replace("\\n", "\n");
+ String cacheMsg = Utility.messageBD(this, "OUTDATED_FILES_CACHED",
vars.getLanguage()).replace(
+ "\\n", "\n");
cacheMsg = "var cacheMsg = \"" + cacheMsg + "\"";
xmlDocument.setParameter("cacheMsg", cacheMsg);
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Thu Apr
08 09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Thu Apr
08 18:08:45 2010 +0200
@@ -899,20 +899,21 @@
for (Module instMod : im.getModulesToInstall()) {
if (instMod.getIsCommercial()) {
- if (!OBPSActiveInstance
- || ak.isModuleSubscribed(instMod.getModuleID()) ==
CommercialModuleStatus.NO_SUBSCRIBED) {
+ CommercialModuleStatus moduleStatus =
ak.isModuleSubscribed(instMod.getModuleID());
+ if (!OBPSActiveInstance || moduleStatus ==
CommercialModuleStatus.NO_SUBSCRIBED
+ || moduleStatus ==
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
notAllowedMods.add(instMod);
if (notSubscribed.length() > 0) {
notSubscribed += ", ";
}
notSubscribed += instMod.getName();
- } else if (ak.isModuleSubscribed(instMod.getModuleID()) ==
CommercialModuleStatus.EXPIRED) {
+ } else if (moduleStatus == CommercialModuleStatus.EXPIRED) {
notAllowedMods.add(instMod);
if (expired.length() > 0) {
expired += ", ";
}
expired += instMod.getName();
- } else if (ak.isModuleSubscribed(instMod.getModuleID()) ==
CommercialModuleStatus.NO_ACTIVE_YET) {
+ } else if (moduleStatus == CommercialModuleStatus.NO_ACTIVE_YET) {
notAllowedMods.add(instMod);
if (notActiveYet.length() > 0) {
notActiveYet += ", ";
@@ -924,21 +925,22 @@
for (Module updMod : im.getModulesToUpdate()) {
if (updMod.getIsCommercial()) {
- if (!OBPSActiveInstance
- || ak.isModuleSubscribed(updMod.getModuleID()) ==
CommercialModuleStatus.NO_SUBSCRIBED) {
+ CommercialModuleStatus moduleStatus =
ak.isModuleSubscribed(updMod.getModuleID());
+ if (!OBPSActiveInstance || moduleStatus ==
CommercialModuleStatus.NO_SUBSCRIBED
+ || moduleStatus ==
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
notAllowedMods.add(updMod);
if (notSubscribed.length() > 0) {
notSubscribed += ", ";
}
notSubscribed += updMod.getName();
- } else if (ak.isModuleSubscribed(updMod.getModuleID()) ==
CommercialModuleStatus.EXPIRED) {
+ } else if (moduleStatus == CommercialModuleStatus.EXPIRED) {
notAllowedMods.add(updMod);
if (expired.length() > 0) {
expired += ", ";
}
expired += updMod.getName();
- } else if (ak.isModuleSubscribed(updMod.getModuleID()) ==
CommercialModuleStatus.NO_ACTIVE_YET) {
+ } else if (moduleStatus == CommercialModuleStatus.NO_ACTIVE_YET) {
notAllowedMods.add(updMod);
if (notActiveYet.length() > 0) {
notActiveYet += ", ";
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/modules/ModuleTree.java
--- a/src/org/openbravo/erpCommon/modules/ModuleTree.java Thu Apr 08
09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ModuleTree.java Thu Apr 08
18:08:45 2010 +0200
@@ -20,6 +20,7 @@
import javax.servlet.ServletException;
+import org.apache.log4j.Logger;
import org.openbravo.base.HttpBaseServlet;
import org.openbravo.data.FieldProvider;
import org.openbravo.erpCommon.utility.FieldProviderFactory;
@@ -33,6 +34,7 @@
* It implements GenericTree, detailed description is in that API doc.
*/
public class ModuleTree extends GenericTree {
+ private final static Logger log4j = Logger.getLogger(ModuleTree.class);
/**
* Constructor to generate a root tree
@@ -103,24 +105,35 @@
*/
public String getHTMLDescription(String node) {
try {
+ ModuleTreeData[] moduleDescription =
ModuleTreeData.selectDescription(conn, lang, node);
+ addLinks(moduleDescription, true);
+ String discard[] = { "" };
+ if (moduleDescription != null && moduleDescription.length > 0) {
+ if (moduleDescription[0].linkname != null &&
!moduleDescription[0].linkname.equals("")) {
+ moduleDescription[0].statusName = "";
+ }
+ if (moduleDescription[0].updateAvailable == null
+ || moduleDescription[0].updateAvailable.equals("")) {
+ discard[0] = "update";
+ }
- ModuleTreeData[] data = ModuleTreeData.selectDescription(conn, lang,
node);
- addLinks(data, true);
- String discard[] = { "" };
- if (data != null && data.length > 0 && data[0].linkname != null
- && !data[0].linkname.equals(""))
- data[0].statusName = "";
- if (data != null && data.length > 0
- && (data[0].updateAvailable == null ||
data[0].updateAvailable.equals("")))
- discard[0] = "update";
+ String url = moduleDescription[0].url;
+ if (url != null && !url.isEmpty()) {
+ if (!url.matches("^[a-z]+://.+")) {
+ // url without protocol: infer http
+ url = "http://" + url;
+ }
+ moduleDescription[0].url = url;
+ }
+ }
XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
"org/openbravo/erpCommon/modules/ModuleTreeDescription",
discard).createXmlDocument();
- xmlDocument.setData("structureDesc", data);
+ xmlDocument.setData("structureDesc", moduleDescription);
return xmlDocument.print();
} catch (Exception e) {
- e.printStackTrace();
+ log4j.error("Error obtaining module description. Module ID:" + node, e);
return "";
}
}
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/modules/ModuleTreeDescription.srpt
--- a/src/org/openbravo/erpCommon/modules/ModuleTreeDescription.srpt Thu Apr
08 09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ModuleTreeDescription.srpt Thu Apr
08 18:08:45 2010 +0200
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008 Openbravo SLU
+ * All portions are Copyright (C) 2008-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -36,7 +36,7 @@
<td>Author</td><td id="author">xxAuthor</td>
</tr>
<tr>
- <td>URL</td><td id="urlLink"><a class="LabelLink_noicon" href="#"
onclick="openLink('http://xx', '_blank');return false;" id="url"></a></td>
+ <td>URL</td><td id="urlLink"><a class="LabelLink_noicon" href="#"
onclick="openLink('xx', '_blank');return false;" id="url"></a></td>
</tr>
<FIELD_TMP id="update">
<tr>
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/modules/ModuleTree_data.xsql
--- a/src/org/openbravo/erpCommon/modules/ModuleTree_data.xsql Thu Apr 08
09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ModuleTree_data.xsql Thu Apr 08
18:08:45 2010 +0200
@@ -186,8 +186,8 @@
COALESCE(MI.Description, T.Description, M.Description) as
Description,
COALESCE(MI.help, T.help, M.Help) as Help,
COALESCE(MI.Author, M.author) as author,
- COALESCE(MI.url, MI.url) as url,
- COALESCE(MI.status, MI.status) as status,
+ COALESCE(MI.url, M.url) as url,
+ COALESCE(MI.status, M.status) as status,
M.Update_Available,
M.AD_Module_ID as Node_ID,
COALESCE(RT.Name, R.Name) as Status_Name,
diff -r c56bf3953565 -r 695c4b4aee08
src/org/openbravo/erpCommon/obps/ActivationKey.java
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Apr 08
09:47:48 2010 +0200
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Apr 08
18:08:45 2010 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2009 Openbravo SLU
+ * All portions are Copyright (C) 2009-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -68,6 +68,8 @@
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits