Notes |
|
(0070690)
|
hgbot
|
2014-10-03 13:02
|
|
|
|
(0070691)
|
mtaal
|
2014-10-03 13:41
|
|
|
|
(0070710)
|
Orekaria
|
2014-10-04 17:02
|
|
Discounts have stopped working in the WebPOS |
|
|
(0070711)
|
hgbot
|
2014-10-04 17:14
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1330a04d606c6f32eb8e06c7142e91ce9d8dbf15
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Sat Oct 04 17:13:48 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1330a04d606c6f32eb8e06c7142e91ce9d8dbf15 [^]
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
---
M src/org/openbravo/mobile/core/MobileCoreComponentServlet.java
A src/org/openbravo/mobile/core/MobileCoreKernelUtils.java
---
|
|
|
(0070712)
|
hgbot
|
2014-10-04 17:14
|
|
Repository: erp/devel/pi
Changeset: 9e26e16a3877d87ce79a7bf85a5a919b24cd7c1d
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Sat Oct 04 17:13:51 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9e26e16a3877d87ce79a7bf85a5a919b24cd7c1d [^]
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
---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
|
|
|
(0070715)
|
mtaal
|
2014-10-05 10:13
(edited on: 2014-10-05 11:03) |
|
Some changes:
- make the id's of the modules static private final and declare them in the beginning of the class using capital names (see example of usage below)
- in the overridden method only keep the if-part you added
- add a return at the end of your if statement
- in kernelutils make ModuleDependencyCycleException private again
- add a call to super at the end of the overridden method
So then the overriding method in MobileCoreKernelUtils becomes something like this:
protected int computeLowLevelCode(Module module, List<Module> modules) {
// Note: doesn't do the if in case the module is already in the modules list
// this is a dependency cycle handled by the super implementation
if (module.getId().equals(DISCOUNTS_MOD_ID) && !modules.contains(module)) {
Module core = OBDal.getInstance().get(Module.class, MOBILE_CORE_MOD_ID);
return 1 + computeLowLevelCode(core, new ArrayList<Module>());
}
super.computeLowLevelCode(module, modules);
}
|
|
|
(0070725)
|
hgbot
|
2014-10-06 09:45
|
|
|
|
(0070726)
|
hgbot
|
2014-10-06 09:45
|
|
Repository: erp/devel/pi
Changeset: 04065681d156f159f421dc981b776f0e1e1d87f2
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Oct 06 09:44:38 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/04065681d156f159f421dc981b776f0e1e1d87f2 [^]
Fixes issue 27751: discounts module dependent on mobile.core (refactor)
- refactored the overriden computeLowLevelCode method
- public class made private
---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
|
|
|
(0070727)
|
mtaal
|
2014-10-06 10:23
|
|
[10:17:47] Martin Taal: thanks the code can be more simplified
[10:17:57] Martin Taal: the static instance member can go
[10:18:01] Martin Taal: the getInstance also
[10:18:09] Martin Taal: and then in the MobileCoreComponentServlet
[10:18:18] Martin Taal: do new MobileCoreKernelUtils()
[10:18:23] Martin Taal: instead of MobileCoreKernelUtils.getInstance()
[10:18:30] Martin Taal: also there are some comment lines in the MobileCoreKernelUtils
[10:18:34] Martin Taal: which can go
[10:18:46] Martin Taal: the commented static and log member |
|
|
(0070731)
|
hgbot
|
2014-10-06 10:55
|
|
|
|
(0070744)
|
hgbot
|
2014-10-06 16:03
|
|
|
|
(0070747)
|
mtaal
|
2014-10-06 17:12
|
|
|
|
|
|
|
|
|