details:   /erp/devel/pi/rev/d1cffe03d0a0
changeset: 12053:d1cffe03d0a0
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Mon May 09 10:46:15 2011 +0200
summary:   fixed bug 16816: NPE when installing a commercial module in a 
community instance

diffstat:

 src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 8e9cfed82de4 -r d1cffe03d0a0 
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Mon May 
09 10:26:35 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java        Mon May 
09 10:46:15 2011 +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) 2008-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -53,10 +53,10 @@
 import org.openbravo.erpCommon.modules.VersionUtility;
 import org.openbravo.erpCommon.modules.VersionUtility.VersionComparator;
 import org.openbravo.erpCommon.obps.ActivationKey;
-import org.openbravo.erpCommon.obps.DisabledModules;
 import org.openbravo.erpCommon.obps.ActivationKey.CommercialModuleStatus;
 import org.openbravo.erpCommon.obps.ActivationKey.LicenseClass;
 import org.openbravo.erpCommon.obps.ActivationKey.SubscriptionStatus;
+import org.openbravo.erpCommon.obps.DisabledModules;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.HttpsUtils;
@@ -1147,7 +1147,7 @@
     ActivationKey ak = ActivationKey.getInstance();
     for (Module mod : modulesToCheck) {
       if (mod.isIsCommercial()
-          && ak.isModuleSubscribed(mod.getModuleID()) != 
CommercialModuleStatus.ACTIVE) {
+          && (!ak.isActive() || ak.isModuleSubscribed(mod.getModuleID()) != 
CommercialModuleStatus.ACTIVE)) {
         notAllowedModules.add(mod);
       }
     }

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to