Notes |
|
(0083290)
|
hgbot
|
2016-01-14 11:52
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b8d61eac6b08896c29b896fa9cc335ef67e570b3
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Jan 08 16:06:37 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8d61eac6b08896c29b896fa9cc335ef67e570b3 [^]
Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Implemented in the server side the new logic for best sellers at terminal type level
---
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
---
|
|
|
(0083291)
|
hgbot
|
2016-01-14 11:53
|
|
Repository: erp/pmods/org.openbravo.retail.bestsellers
Changeset: 4ebe33304373a442ad8628eb5649e6579ecde12c
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 14 11:53:44 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/4ebe33304373a442ad8628eb5649e6579ecde12c [^]
Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Removing local functionality. Now all Best Sellers logic goes in the backend. in the org.openbravo.retail.posterminal module
---
R src/org/openbravo/retail/bestsellers/BestComponentProvider.java
R src/org/openbravo/retail/bestsellers/master/BestSellers.java
R web/org.openbravo.retail.bestsellers/js/components/ModelHooks.js
R web/org.openbravo.retail.bestsellers/js/model/BestSellers.js
---
|
|
|
|
Hi,
Although I like the idea of using the bestsellers flag both for local mode and remote mode a lot, I think there is one specific part of the solution should should be done in a better way.
Currently, the code which generates this bestsellers flag is now in the posterminal module, with a call to a local method to check if a particular module is installed:
if (Product.hasBestSellersModule()) {
This is fundamentally wrong, and goes against the principles of modularity. Instead of doing it this way, the code inside this if should be moved to a separate class, which extends the ModelExtension class, with the proper qualifier so that the property is included in the query contained in the Product.java.
Once this is done, it will likely fail at this point, because the ModelExtensionUtils.getPropertyExtensions method is not prepared to handle the case of overwriting properties. However, this should be very easy to fix inside this method (or even inside the addAll method in the HQLPropertyList class), and this way the code ends up being much cleaner, and at the same time we will have added a capability which didn't exist before (the ability to overwrite properties in Core modules).
Please contact me if you think there is something else missing. |
|
|
(0083421)
|
mtaal
|
2016-01-20 00:21
|
|
Yes I agree with the comments from Antonio, re-opening the issue.
gr. Martin |
|
|
(0083765)
|
hgbot
|
2016-02-01 09:27
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0b24bc21cf33665ff29b51fd2dd720c0a54efd04
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 28 17:51:06 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b24bc21cf33665ff29b51fd2dd720c0a54efd04 [^]
Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Adding priority property to HQLProperty to implement overwritting of HQLProperty objects in modules
---
M src/org/openbravo/mobile/core/model/HQLProperty.java
M src/org/openbravo/mobile/core/model/HQLPropertyList.java
---
|
|
|
(0083766)
|
hgbot
|
2016-02-01 09:27
|
|
|
|
(0083767)
|
hgbot
|
2016-02-01 09:29
|
|
Repository: erp/pmods/org.openbravo.retail.bestsellers
Changeset: 8d3ebfe3d2b98fdb4f2613b1ae7acf098cdc8211
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 28 18:20:15 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/8d3ebfe3d2b98fdb4f2613b1ae7acf098cdc8211 [^]
Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Implement best sellers logic in bestseller HQL field
---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
A src/org/openbravo/retail/bestsellers/BestSellersProperties.java
---
|
|
|
|
The fix adds a new property to HQLProperty object: priority, to set the priority of a field.
Then HQLPropertyList generates the HQL part with all the HQLProperty fields and if there are HQLProperty fields with the same name and different priority, only the HQLProperty field with higher priority is kept in the HQL.
For backward compatibility reasons, the order of addition of HQLProperty fields is maintained and also if there are different HQLProperty fields with the same name and priority, both are added. |
|
|
(0083781)
|
mtaal
|
2016-02-01 11:42
|
|
|
|
(0083782)
|
hgbot
|
2016-02-01 11:49
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1632372dc10a40ad5eee1f3e48a871da0d4aadff
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 28 17:44:33 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1632372dc10a40ad5eee1f3e48a871da0d4aadff [^]
Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Moving BestSellers logic to BestSellers module.
---
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
---
|
|