Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036553Retail ModulesWeb POSpublic2017-07-31 17:572018-05-08 15:56
migueldejuana 
rqueralta 
normalmajoralways
newopen 
5
 
 
No
0036553: Loading a receipt with a no active bp with different locations fails
See steps.
- Login
- Select Stephane Cluster (by default, Invoice address will be different to shipping address)
- Add a product
- Pay the order
- Go to ERP and uncheck active field for Stephane Cluster
- Logout and login in Web POS
- Select Menu option "Receipts"
- Select created order and load it
- ERROR! javascript error:
 
d56b9c5….js:3035 TypeError: Cannot read property 'get' of undefined
    at locationForBpartner (d56b9c5….js:30349)
    at d56b9c5….js:30406
    at processResult (d56b9c5….js:4371); line: Object.OB.UTIL.showError (http://localhost:8080/openbravo/web/js/gen/d56b9c5f60fb75a5e802a1ff97567747.js:11752:6 [^]) (*,+)
No tags attached.
Issue History
2017-07-31 17:57migueldejuanaNew Issue
2017-07-31 17:57migueldejuanaAssigned To => Retail
2017-07-31 17:57migueldejuanaTriggers an Emergency Pack => No
2018-04-02 18:27rqueraltaAssigned ToRetail => rqueralta
2018-04-02 18:27rqueraltaStatusnew => scheduled
2018-04-05 22:40hgbotCheckin
2018-04-05 22:40hgbotNote Added: 0103703
2018-04-05 22:40hgbotStatusscheduled => resolved
2018-04-05 22:40hgbotResolutionopen => fixed
2018-04-05 22:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/315b3c2766a86d29c775967d152fabf8bf3c2806 [^]
2018-05-04 15:16marvintmNote Added: 0104285
2018-05-04 15:16marvintmStatusresolved => new
2018-05-04 15:16marvintmResolutionfixed => open
2018-05-08 15:56hgbotCheckin
2018-05-08 15:56hgbotNote Added: 0104327

Notes
(0103703)
hgbot   
2018-04-05 22:40   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 315b3c2766a86d29c775967d152fabf8bf3c2806
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Mon Apr 02 16:52:18 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/315b3c2766a86d29c775967d152fabf8bf3c2806 [^]

Fixed issue 36553: Loading a receipt with a no active bp with different
locations fails

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0104285)
marvintm   
2018-05-04 15:16   
Solution seems not to be fully correct. I followed the steps to reproduce, including creating a ticket with different invoicing and shipping locations, and then, when I disabled the customer and reloaded the ticket, it did no longer fail, but instead, the ticket I see only displays one address, and in the backend it clearly has two different addresses.

Besides this, it's not nice to save the location as a global variable:

OB.UTIL.bpLoc = bpLoc

because it could lead to problems later on, and creates a global reference which adds a potential memory leak issue. Instead, the location should be passed as a parameter to the function or event.
(0104327)
hgbot   
2018-05-08 15:56   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 965527c372e92188e00533865d421cbdaa4ed656
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Sat May 05 08:52:46 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/965527c372e92188e00533865d421cbdaa4ed656 [^]

Related to issue 36553: Loading a receipt with a no active bp with different
locations fails

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