Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041598Retail ModulesWeb POSpublic2019-08-07 13:412019-08-21 15:17
umartirena 
rqueralta 
immediatemajoralways
closedfixed 
5
 
RR19Q4 
marvintm
No
0041598: Create a new shipping address and assign to a receipt returns a JS error
Create a new shipping address and assign to a receipt returns a JS error.
Login into https://livebuilds.openbravo.com/retail_pi_pgsql/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^]
 * Click on the assigned shipping address
 * Click on new address
 * Set an address name
 * Uncheck Invoicing Address
 * Save
 * Click on Assign to Receipt (Ship.)
 * JS error is raised

Uncaught TypeError: Cannot read property 'push' of undefined
    at Object.tap (74e906cc00922c64cb590e2f300f59a8.js:105548)
    at Object.<anonymous> (underscore-1.3.3.min.js:23)
    at Object.origTap (underscore-1.3.3.min.js:23)
    at Object.tap (underscore-1.3.3.min.js:23)
    at Object.dispatch (enyo.js:628)
    at Object.dispatchEvent (enyo.js:612)
    at Object.enyo.kind.inherited (enyo.js:410)
    at Object.dispatchEvent (enyo.js:1338)
    at Object.dispatchBubble (enyo.js:616)
    at Object.bubble (enyo.js:604)
No tags attached.
depends on backport 0041601RR19Q3 closed rqueralta Create a new shipping address and assign to a receipt returns a JS error 
caused by defect 0040880 closed rqueralta Creation and Assigning of New Shipment Address for customer is not working properly 
png Screenshot from 2019-08-07 13-37-07.png (311,594) 2019-08-07 13:41
https://issues.openbravo.com/file_download.php?file_id=13216&type=bug
Issue History
2019-08-07 13:41umartirenaNew Issue
2019-08-07 13:41umartirenaAssigned To => Retail
2019-08-07 13:41umartirenaFile Added: Screenshot from 2019-08-07 13-37-07.png
2019-08-07 13:41umartirenaTriggers an Emergency Pack => No
2019-08-07 13:43umartirenaRelationship addedcaused by 0040880
2019-08-07 14:23guillermogilResolution time => 1566338400
2019-08-07 14:42marvintmStatusnew => scheduled
2019-08-07 14:42marvintmAssigned ToRetail => rqueralta
2019-08-08 05:02hgbotCheckin
2019-08-08 05:02hgbotNote Added: 0113887
2019-08-08 05:02hgbotStatusscheduled => resolved
2019-08-08 05:02hgbotResolutionopen => fixed
2019-08-08 05:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c4a80a14233d9da4439c738d5969b4530174f0f9 [^]
2019-08-08 12:08marvintmNote Added: 0113902
2019-08-08 12:08marvintmStatusresolved => new
2019-08-08 12:08marvintmResolutionfixed => open
2019-08-09 12:26hgbotCheckin
2019-08-09 12:26hgbotNote Added: 0113926
2019-08-09 12:26hgbotStatusnew => resolved
2019-08-09 12:26hgbotResolutionopen => fixed
2019-08-09 12:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c4a80a14233d9da4439c738d5969b4530174f0f9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/fc1f033b3629682fc501653423873bd2c3d4d50a [^]
2019-08-09 13:03marvintmReview Assigned To => marvintm
2019-08-09 13:03marvintmStatusresolved => closed
2019-08-09 13:03marvintmFixed in Version => RR19Q4
2019-08-09 14:52aaroncaleroNote Added: 0113931
2019-08-09 14:52aaroncaleroStatusclosed => new
2019-08-09 14:52aaroncaleroResolutionfixed => open
2019-08-09 14:52aaroncaleroFixed in VersionRR19Q4 =>
2019-08-15 15:01hgbotCheckin
2019-08-15 15:01hgbotNote Added: 0114022
2019-08-15 15:01hgbotStatusnew => resolved
2019-08-15 15:01hgbotResolutionopen => fixed
2019-08-15 15:01hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/fc1f033b3629682fc501653423873bd2c3d4d50a [^] => http://code.openbravo.com/retail/backports/3.0RR19Q3/org.openbravo.retail.posterminal/rev/e2331459b6115b68e8120072283d7501d0fc2309 [^]
2019-08-19 11:55marvintmNote Added: 0114080
2019-08-19 11:55marvintmStatusresolved => closed
2019-08-19 11:55marvintmFixed in Version => RR19Q4
2019-08-21 15:17hgbotCheckin
2019-08-21 15:17hgbotNote Added: 0114110

Notes
(0113887)
hgbot   
2019-08-08 05:02   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c4a80a14233d9da4439c738d5969b4530174f0f9
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Aug 07 10:53:59 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c4a80a14233d9da4439c738d5969b4530174f0f9 [^]

Fixed issue 41598: Create a new shipping address and assign to a receipt returns
a JS error

- Initialized locations array before insertion if undefined

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
---
(0113902)
marvintm   
2019-08-08 12:08   
Still doesn't work fully correctly.

In both local and remote mode, now there is no javascript error, but when clicking on "Assign to receipt (ship)", nothing happens, and the previous address is kept instead.
(0113926)
hgbot   
2019-08-09 12:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: fc1f033b3629682fc501653423873bd2c3d4d50a
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Aug 08 18:56:03 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/fc1f033b3629682fc501653423873bd2c3d4d50a [^]

Fixed issue 41598: Create a new shipping address and assign to a receipt returns
a JS error

- The saveLocModel function was overwriting the value of the new shipping address
with the old value

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
---
(0113931)
aaroncalero   
2019-08-09 14:52   
The issue seems to be not fully fixed yet. There are cases in which the new address is still not assigned:
 * Click on the assigned shipping address
 * Click on new address
 * Set an address name
 * Uncheck Invoicing Address
 * Save
 * Click on Assign to Receipt (Ship.)
 * Click again on the assigned shipping address
 * Click on the assigned shipping address
 * Click on new address
 * Set an address name
 * Uncheck Invoicing Address
 * Save
 * Click on Assign to Receipt (Ship.)
==> The assigned address seems to be a random shipping address from the customer. Without checking the code, looks like a query without the correct ID filter (only filtering by bp id)
(0114022)
hgbot   
2019-08-15 15:01   
Repository: retail/backports/3.0RR19Q3/org.openbravo.retail.posterminal
Changeset: e2331459b6115b68e8120072283d7501d0fc2309
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Aug 15 09:00:25 2019 -0400
URL: http://code.openbravo.com/retail/backports/3.0RR19Q3/org.openbravo.retail.posterminal/rev/e2331459b6115b68e8120072283d7501d0fc2309 [^]

Fixed issue 41598: Create a new shipping address and assign to a receipt returns
a JS error

- The saveLocModel function was overwriting the value of the new shipping address
with the old value

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
---
(0114080)
marvintm   
2019-08-19 11:55   
We haven't been able to reproduce the issue reported by Aarón. If we manage to reproduce it at some point, we will report a new issue for it.
(0114110)
hgbot   
2019-08-21 15:17   
Repository: tools/automation/pi-mobile
Changeset: 1aac6f62be3a5f09daa8196b8ac04d21a9460b5b
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Mon Aug 19 11:35:59 2019 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/1aac6f62be3a5f09daa8196b8ac04d21a9460b5b [^]

Related to issue 41598: Added automated test

---
M src-test/org/openbravo/test/mobile/core/utils/AllowedErrorsHelper.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/customer/I41598_VerifyNewShipmentAddressNotRaiseJSError.java
---