Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031607
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminoralways2015-11-26 18:382016-02-05 16:08
ReporterdaniOpenbravoView Statuspublic 
Assigned Toadrianromero 
PrioritynormalResolutionfixedFixed in VersionRR16Q2
StatusclosedFix in branchFixed in SCM revision1632372dc10a
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabaseOracleJava version1.7
OS Version14.04Database version12cAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.

DescriptionRetail Best Sellers module (org.openbravo.retail.bestsellers) does not work with HGVOL.
Steps To ReproduceEnable High Volumes preference.
1. Log in the ERP.
2. Go to POS Terminal Type window and select any record.
3. Set "Has Bestsellers" field = Y.
4. In Best Sellers tab, select a product and set it as Best Seller= Y.
5. Log in Web POS with a terminal that belongs to the terminal type configured on step 2.
6. Search the product defined on step 4.
7. Realize that this product does not appear as Best Seller.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0032014 closedadrianromero [SERQA 614]PaidReceipts java class has hardcoded the position for fields 
blocks feature request 0031986 closedSandrahuguet [HGVOL] support filtering by bestsellers in search view 

-  Notes
(0083290)
hgbot (developer)
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 (developer)
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
---
(0083392)
marvintm (manager)
2016-01-19 09:58

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 (manager)
2016-01-20 00:21

Yes I agree with the comments from Antonio, re-opening the issue.

gr. Martin
(0083765)
hgbot (developer)
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 (developer)
2016-02-01 09:27

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6b29ce12e7f84d5a1ff8701585552e0fbc14ad93
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Jan 29 13:51:39 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6b29ce12e7f84d5a1ff8701585552e0fbc14ad93 [^]

Fixes issue 0031607: [HGVOL] Retail Best Sellers module does not work with HGVOL.
* Backward compatibility code for properties with the same priority

---
M src/org/openbravo/mobile/core/model/HQLPropertyList.java
---
(0083767)
hgbot (developer)
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
---
(0083779)
adrianromero (manager)
2016-02-01 11:10

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 (manager)
2016-02-01 11:42

Hi Adrian,
I am reviewing, looks good afaics, but this part of the code can go right?
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/436df3ddebfa/src/org/openbravo/retail/posterminal/master/ProductProperties.java#l82 [^]

and this one to:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/master/Product.java#l263 [^]

As a side remark, I am not a big fan of final methods. This greatly limits possibilities of other code to extend/override/solve things. So imho no method should be final unless there is a specific reason for that specific method to be final (honestly I have had this maybe once or twice in the past 15 years, maybe not even, can't remember even :-) ).
(0083782)
hgbot (developer)
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
---

- Issue History
Date Modified Username Field Change
2015-11-26 18:38 daniOpenbravo New Issue
2015-11-26 18:38 daniOpenbravo Assigned To => Retail
2015-11-26 18:38 daniOpenbravo Resolution time => 1449702000
2015-11-26 18:38 daniOpenbravo Triggers an Emergency Pack => No
2015-12-17 17:01 Sandrahuguet Issue Monitored: Sandrahuguet
2015-12-17 18:16 daniOpenbravo Issue Monitored: daniOpenbravo
2016-01-14 11:52 hgbot Checkin
2016-01-14 11:52 hgbot Note Added: 0083290
2016-01-14 11:52 hgbot Status new => resolved
2016-01-14 11:52 hgbot Resolution open => fixed
2016-01-14 11:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8d61eac6b08896c29b896fa9cc335ef67e570b3 [^]
2016-01-14 11:53 hgbot Checkin
2016-01-14 11:53 hgbot Note Added: 0083291
2016-01-14 11:54 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b8d61eac6b08896c29b896fa9cc335ef67e570b3 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/4ebe33304373a442ad8628eb5649e6579ecde12c [^]
2016-01-14 11:55 adrianromero Review Assigned To => mtaal
2016-01-19 09:58 marvintm Note Added: 0083392
2016-01-20 00:22 mtaal Note Added: 0083421
2016-01-20 00:22 mtaal Status resolved => new
2016-01-20 00:23 mtaal Resolution fixed => open
2016-01-27 15:55 Sandrahuguet Relationship added blocks 0031986
2016-01-27 15:58 marvintm Assigned To Retail => adrianromero
2016-02-01 09:27 hgbot Checkin
2016-02-01 09:27 hgbot Note Added: 0083765
2016-02-01 09:27 hgbot Status new => resolved
2016-02-01 09:27 hgbot Resolution open => fixed
2016-02-01 09:27 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/4ebe33304373a442ad8628eb5649e6579ecde12c [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b24bc21cf33665ff29b51fd2dd720c0a54efd04 [^]
2016-02-01 09:27 hgbot Checkin
2016-02-01 09:27 hgbot Note Added: 0083766
2016-02-01 09:27 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b24bc21cf33665ff29b51fd2dd720c0a54efd04 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6b29ce12e7f84d5a1ff8701585552e0fbc14ad93 [^]
2016-02-01 09:29 hgbot Checkin
2016-02-01 09:29 hgbot Note Added: 0083767
2016-02-01 09:29 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6b29ce12e7f84d5a1ff8701585552e0fbc14ad93 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/8d3ebfe3d2b98fdb4f2613b1ae7acf098cdc8211 [^]
2016-02-01 10:59 adrianromero Relationship added related to 0032014
2016-02-01 11:10 adrianromero Note Added: 0083779
2016-02-01 11:42 mtaal Note Added: 0083781
2016-02-01 11:49 hgbot Checkin
2016-02-01 11:49 hgbot Note Added: 0083782
2016-02-01 11:49 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/8d3ebfe3d2b98fdb4f2613b1ae7acf098cdc8211 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1632372dc10a40ad5eee1f3e48a871da0d4aadff [^]
2016-02-05 16:08 marvintm Review Assigned To mtaal => marvintm
2016-02-05 16:08 marvintm Status resolved => closed
2016-02-05 16:08 marvintm Fixed in Version => RR16Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker