details:   /erp/devel/pi/rev/511757e230d2
changeset: 6962:511757e230d2
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Fri Apr 09 08:18:55 2010 +0200
summary:   buy-out: show different text when installing commercial modules on 
convervted instances

diffstat:

 src-db/database/sourcedata/AD_TEXTINTERFACES.xml                           |  
11 +++
 src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java                 |  
30 +++++++--
 src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html |   
7 ++-
 src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.xml  |   
3 +-
 4 files changed, 42 insertions(+), 9 deletions(-)

diffs (154 lines):

diff -r f22a255278e5 -r 511757e230d2 
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml  Fri Apr 09 10:34:36 
2010 +0530
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml  Fri Apr 09 08:18:55 
2010 +0200
@@ -20674,6 +20674,17 @@
 <!--83B5190C0B3C56C7E040007F01013254-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--83B5190C0B3C56C7E040007F01013254--></AD_TEXTINTERFACES>
 
+<!--83C7A37032CFF19DE040007F01012727--><AD_TEXTINTERFACES>
+<!--83C7A37032CFF19DE040007F01012727-->  
<AD_TEXTINTERFACES_ID><![CDATA[83C7A37032CFF19DE040007F01012727]]></AD_TEXTINTERFACES_ID>
+<!--83C7A37032CFF19DE040007F01012727-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--83C7A37032CFF19DE040007F01012727-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--83C7A37032CFF19DE040007F01012727-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--83C7A37032CFF19DE040007F01012727-->  <TEXT><![CDATA[The "Subscription 
Conversion Option" has been exercised for this instance, which means you are no 
longer covered by an active professional subscription. This option enables 
perpetual use of the module "as is", but does not entitle you to automatic 
updates via the Module Management Console. You cannot install/update the 
following module(s) are released under a commercial license: ]]></TEXT>
+<!--83C7A37032CFF19DE040007F01012727-->  
<FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--83C7A37032CFF19DE040007F01012727-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--83C7A37032CFF19DE040007F01012727-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--83C7A37032CFF19DE040007F01012727--></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 f22a255278e5 -r 511757e230d2 
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Fri Apr 
09 10:34:36 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Fri Apr 
09 08:18:55 2010 +0200
@@ -845,6 +845,7 @@
     String notSubscribed = "";
     String expired = "";
     String notActiveYet = "";
+    String converted = "";
 
     boolean showNotActivatedError = false;
 
@@ -900,13 +901,18 @@
       for (Module instMod : im.getModulesToInstall()) {
         if (instMod.getIsCommercial()) {
           CommercialModuleStatus moduleStatus = 
ak.isModuleSubscribed(instMod.getModuleID());
-          if (!OBPSActiveInstance || moduleStatus == 
CommercialModuleStatus.NO_SUBSCRIBED
-              || moduleStatus == 
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
+          if (!OBPSActiveInstance || moduleStatus == 
CommercialModuleStatus.NO_SUBSCRIBED) {
             notAllowedMods.add(instMod);
             if (notSubscribed.length() > 0) {
               notSubscribed += ", ";
             }
             notSubscribed += instMod.getName();
+          } else if (moduleStatus == 
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
+            notAllowedMods.add(instMod);
+            if (converted.length() > 0) {
+              converted += ", ";
+            }
+            converted += instMod.getName();
           } else if (moduleStatus == CommercialModuleStatus.EXPIRED) {
             notAllowedMods.add(instMod);
             if (expired.length() > 0) {
@@ -926,14 +932,18 @@
       for (Module updMod : im.getModulesToUpdate()) {
         if (updMod.getIsCommercial()) {
           CommercialModuleStatus moduleStatus = 
ak.isModuleSubscribed(updMod.getModuleID());
-          if (!OBPSActiveInstance || moduleStatus == 
CommercialModuleStatus.NO_SUBSCRIBED
-              || moduleStatus == 
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
+          if (!OBPSActiveInstance || moduleStatus == 
CommercialModuleStatus.NO_SUBSCRIBED) {
             notAllowedMods.add(updMod);
             if (notSubscribed.length() > 0) {
               notSubscribed += ", ";
             }
             notSubscribed += updMod.getName();
-
+          } else if (moduleStatus == 
CommercialModuleStatus.CONVERTED_SUBSCRIPTION) {
+            notAllowedMods.add(updMod);
+            if (converted.length() > 0) {
+              converted += ", ";
+            }
+            converted += updMod.getName();
           } else if (moduleStatus == CommercialModuleStatus.EXPIRED) {
             notAllowedMods.add(updMod);
             if (expired.length() > 0) {
@@ -951,13 +961,15 @@
       }
     }
 
-    if (notSubscribed.length() > 0 || expired.length() > 0 || 
notActiveYet.length() > 0) {
-      String discard[] = { "", "", "", "" };
+    if (notSubscribed.length() > 0 || expired.length() > 0 || 
notActiveYet.length() > 0
+        || converted.length() > 0) {
+      String discard[] = { "", "", "", "", "" };
 
       if (!OBPSActiveInstance) {
         discard[0] = "OBPSInstance-NotActive";
         discard[1] = "OBPSInstance-Expired";
         discard[2] = "OBPSInstance-NoActiveYet";
+        discard[3] = "OBPSInstance-Converted";
       } else {
         discard[0] = "CEInstance";
         if (notSubscribed.length() == 0) {
@@ -969,6 +981,9 @@
         if (notActiveYet.length() == 0) {
           discard[3] = "OBPSInstance-NoActiveYet";
         }
+        if (converted.length() == 0) {
+          discard[4] = "OBPSInstance-Converted";
+        }
       }
 
       if ((im.getModulesToInstall().length == 1 && 
im.getModulesToInstall()[0].getModuleID()
@@ -989,6 +1004,7 @@
       xmlDocument.setParameter("theme", vars.getTheme());
       xmlDocument.setParameter("modules", notSubscribed);
       xmlDocument.setParameter("expired", expired);
+      xmlDocument.setParameter("converted", converted);
       xmlDocument.setParameter("noActiveYet", notActiveYet);
       response.setContentType("text/html; charset=UTF-8");
       final PrintWriter out = response.getWriter();
diff -r f22a255278e5 -r 511757e230d2 
src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html
--- 
a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html    
    Fri Apr 09 10:34:36 2010 +0530
+++ 
b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html    
    Fri Apr 09 08:18:55 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):  ______________________________________.
  ************************************************************************
@@ -225,6 +225,11 @@
                 <br/>
                 </div>
                 
+                <div id="OBPSInstance-Converted">
+                <p class="Label_ReadOnly_Text">The "Subscription Conversion 
Option" has been exercised for this instance, which means you are no longer 
covered by an active professional subscription. This option enables perpetual 
use of the module "as is", but does not entitle you to automatic updates via 
the Module Management Console. You cannot install/update the following  
module(s) are released under a commercial license:&nbsp;<FIELD_TMP 
id="converted"></FIELD_TMP><br /></p>
+                <br/>
+                </div>
+                
                 <div id="OBPSInstance-NoActiveYet">
                 <p class="Label_ReadOnly_Text">The following module(s) are 
released under a commercial license that is not active yet:&nbsp;<FIELD_TMP 
id="noActiveYet"></FIELD_TMP><br /></p>
                 <p><a class="Label_ReadOnly_Text LabelLink_noicon" 
href="http://www.openbravo.com/product/erp/module/acquire"; 
target="_blank">Learn how</a>&nbsp;to renew licenses for commercial modules.</p>
diff -r f22a255278e5 -r 511757e230d2 
src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.xml
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.xml 
Fri Apr 09 10:34:36 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.xml 
Fri Apr 09 08:18:55 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) 2009 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -34,5 +34,6 @@
   <PARAMETER id="name" name="modules" default=""/>
   <PARAMETER id="expired" name="expired" default=""/>
   <PARAMETER id="noActiveYet" name="noActiveYet" default=""/>
+  <PARAMETER id="converted" name="converted" default=""/>
 
 </REPORT>

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to