Fixes issue 27751: discounts is enforced to be dependent of mobile.core
authorRafa Alonso <rafael.alonso@openbravo.com>
Sat, 04 Oct 2014 17:13:51 +0200
changeset 24989 37eee79cd6a7
parent 24988 78440a0c23d0
child 24990 753d307e0769
Fixes issue 27751: discounts is enforced to be dependent of mobile.core

a. If the discounts module is dependent of mobile.core, the ERP is forced to install mobile.core, which is unwanted.
b. If the discounts module is not dependent of mobile.core, the javascript files are inserted before the mobile.core javascript files. This behavior prevent discounts to be computed

A hack has been inserted until better decoupling of mobile from the ERP is made
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java	Fri Oct 03 07:51:10 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java	Sat Oct 04 17:13:51 2014 +0200
@@ -292,7 +292,7 @@
     }
   }
 
-  private int computeLowLevelCode(Module module, List<Module> modules) {
+  protected int computeLowLevelCode(Module module, List<Module> modules) {
     if (module.getId().equals("0")) {
       return 0;
     }
@@ -461,7 +461,7 @@
     return DalUtil.getPropertyFromPath(entity, field.getProperty());
   }
 
-  private class ModuleDependencyCycleException extends OBException {
+  public class ModuleDependencyCycleException extends OBException {
 
     private static final long serialVersionUID = 1L;