Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027726Retail ModulesWeb POSpublic2014-10-01 18:112014-10-13 13:52
marvintm 
marvintm 
normalminoralways
closedfixed 
5
 
RR14Q4 
marvintm
Production - QA Approved
2014-04-16
RR14Q3
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6c9232343173 [^]
No
0027726: When the POS sends an order, it includes the image data in the JSON sent to the backend
Right now, the image information of the products is being included in the JSON finally sent to the backend. This is wrong.
Create an order and complete it in the Web POS. Check with the Chrome developer tools that the image information is being sent as part of the request to the backend.
This problem is a regression which was caused by the refactor of the data synchronization tasks, which was included in Q3. As part of this refactor, some code which was responsible of removing image information, and other redundant things such as the undo information, is no longer being called when the JSON information is generated when building the request.

This logic should be called again, probably as part of the dataordersave.js functions which prepare the order to be sent.
Performance
Issue History
2014-10-01 18:11marvintmNew Issue
2014-10-01 18:11marvintmAssigned To => marvintm
2014-10-01 18:11marvintmRegression level => Production - QA Approved
2014-10-01 18:11marvintmRegression date => 2014-04-16
2014-10-01 18:11marvintmRegression introduced in release => RR14Q3
2014-10-01 18:11marvintmRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6c9232343173 [^]
2014-10-01 18:11marvintmTriggers an Emergency Pack => No
2014-10-02 07:39alostaleTag Attached: Performance
2014-10-02 07:40alostaleIssue Monitored: alostale
2014-10-07 00:11hgbotCheckin
2014-10-07 00:11hgbotNote Added: 0070754
2014-10-07 00:11hgbotStatusnew => resolved
2014-10-07 00:11hgbotResolutionopen => fixed
2014-10-07 00:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1f105c08f2eedf3e3e521f1813ec5f9686a15ed8 [^]
2014-10-07 00:14mtaalNote Added: 0070755
2014-10-10 11:35marvintmNote Added: 0070863
2014-10-10 11:35marvintmStatusresolved => new
2014-10-10 11:35marvintmResolutionfixed => open
2014-10-10 11:35hgbotCheckin
2014-10-10 11:35hgbotNote Added: 0070864
2014-10-10 11:36hgbotCheckin
2014-10-10 11:36hgbotNote Added: 0070865
2014-10-10 11:36hgbotStatusnew => resolved
2014-10-10 11:36hgbotResolutionopen => fixed
2014-10-10 11:36hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1f105c08f2eedf3e3e521f1813ec5f9686a15ed8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/42fbf463fb9ca9454b88e5aa30754f963b3abd1e [^]
2014-10-10 14:05hgbotCheckin
2014-10-10 14:05hgbotNote Added: 0070875
2014-10-13 13:52marvintmReview Assigned To => marvintm
2014-10-13 13:52marvintmStatusresolved => closed
2014-10-13 13:52marvintmFixed in Version => RR14Q4

Notes
(0070754)
hgbot   
2014-10-07 00:11   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1f105c08f2eedf3e3e521f1813ec5f9686a15ed8
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Oct 07 00:11:26 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1f105c08f2eedf3e3e521f1813ec5f9686a15ed8 [^]

Fixes issue 27726: When the POS sends an order, it includes the image data in the JSON sent to the backend
Use the order model serializeToJSON when creating the json property to be send to the server

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0070755)
mtaal   
2014-10-07 00:14   
To review the issue, before applying the fix:
- create a ticket with a product with an image
- check the json which is being sent to the server, it will include a product within each line and within the product there is the img json property

Apply the patch
- see that no img tag is sent to the server
(0070863)
marvintm   
2014-10-10 11:35   
There is a problem after the fix. Part of the logic in the serializeToJSON method had been copied into the dataordersave.js file, so now it is being executed twice, so returns currently have their payments set as positive and not negative. This needs to be changed, so this duplicated logic needs to be removed.
(0070864)
hgbot   
2014-10-10 11:35   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d671ae30304fc12365e08cba81c70d7a511aec98
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Oct 10 11:35:26 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d671ae30304fc12365e08cba81c70d7a511aec98 [^]

Related to issue 27726. Formatted code.

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0070865)
hgbot   
2014-10-10 11:36   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 42fbf463fb9ca9454b88e5aa30754f963b3abd1e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Oct 10 11:36:23 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/42fbf463fb9ca9454b88e5aa30754f963b3abd1e [^]

Fixed issue 27726. Removed duplicated logic, which is now being executed inside the serializeToJSON code

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0070875)
hgbot   
2014-10-10 14:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: debc848c47a6cd199a30c95fae99167c83df642d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Oct 10 14:04:57 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/debc848c47a6cd199a30c95fae99167c83df642d [^]

Related to issue 27726. Moved payment adjustment for returns from serializeToJson to OrderSave

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---