Openbravo Issue Tracking System - Retail Modules
View Issue Details
0029160Retail ModulesWeb POSpublic2015-03-06 09:302015-03-13 13:02
aaroncalero 
aaroncalero 
normalminoralways
closedfixed 
5
 
RR15Q2 
adrianromero
No
0029160: The BarcodeActionHandler component should be refactored to allow more specific extensions
The BarcodeActionHandler component should be refactored to allow more specific extensions.
The way it is now, if an external module requires to extend the OB.UI.BarcodeActionHandler component to do a custom search, it must override the findProductByBarcode function and all the callbacks inside it, thus duplicating code.
It is not possible to override just one callback.
Check the web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js on the org.openbravo.retail.posterminal module and verify that the component contains only the functions addWhereFilter and findProductByBarcode.
All callbacks should be 'public' functions of the component, so external modules can override them independently
No tags attached.
related to defect 0035812 closed Sandrahuguet Upc filter is wrong built in remote query for products 
blocks defect 0029161RR15Q2 closed aaroncalero [MultiUPC] Refactor the Retail MultiUPC module to use the new BarcodeHandler componen structure 
Issue History
2015-03-06 09:30aaroncaleroNew Issue
2015-03-06 09:30aaroncaleroAssigned To => aaroncalero
2015-03-06 09:30aaroncaleroTriggers an Emergency Pack => No
2015-03-06 09:38aaroncaleroRelationship addedblocks 0029161
2015-03-06 11:06hgbotCheckin
2015-03-06 11:06hgbotNote Added: 0075237
2015-03-06 11:06hgbotStatusnew => resolved
2015-03-06 11:06hgbotResolutionopen => fixed
2015-03-06 11:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6223f8155593fe908e1e5437816bd16a78ca32c4 [^]
2015-03-13 13:02adrianromeroReview Assigned To => adrianromero
2015-03-13 13:02adrianromeroNote Added: 0075551
2015-03-13 13:02adrianromeroStatusresolved => closed
2017-04-20 16:51SandrahuguetRelationship addedrelated to 0035812

Notes
(0075237)
hgbot   
2015-03-06 11:06   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6223f8155593fe908e1e5437816bd16a78ca32c4
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Fri Mar 06 11:04:38 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6223f8155593fe908e1e5437816bd16a78ca32c4 [^]

Fixed issue 29160: The BarcodeActionHandler component should be refactored to allow more specific extensions

Refactored the OB.UI.BarcodeActionHandler component:
Split the search flow into several independent functions: findProductByBarcode, searchProduct, searchProductCallback and successCallbackProducts
Changed the OB.Dal.query into an OB.Dal.find for better performance
The product UPC is now upper'd on the master data query instead of on the client
Removed the addWhereFilter function as it's no longer used

---
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js
---
(0075551)
adrianromero   
2015-03-13 13:02   
Verified