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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040995
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-05-31 15:042019-08-06 16:28
ReporteraaroncaleroView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionfixedFixed in VersionRR19Q4
StatusclosedFix in branchFixed in SCM revision90fa52f23e8a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040995: BPLocation called without filters under specific circumstances

DescriptionWhen using the Remote for Customers preference enabled, there is a specific flow in web pos that causes a call to BPLocation without filters, which causes it to return all available addresses, and potentially associating a customer with an address that is not their's.
Steps To ReproduceLog in in Backend, go to the Preference window and configure the Enable Remote for Customer preference with value Y

Login in Web POS
Click on the Customer button and search for Arturo Montoro
Click on the 3 dots context menu and click on Edit Customer
Save the customer and assign it to the receipt.
Verify the locationModel and locationBillModel attributes of the customer:
OB.MobileApp.model.receipt.get('bp').get('locationModel') and OB.MobileApp.model.receipt.get('bp').get('locationBillModel')

The locationModel will match the address of the receipt, but the locationBillModel will be an address from a different customer.
Proposed SolutionThe problem seems to be in the setBPandBPLoc function of the order.
With the specified flow, it seems that the locId property is missing in the customer model.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0112424)
hgbot (developer)
2019-06-05 15:22

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1d39d9737c4fc16d1e497b7171f16a2f6915216e
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Jun 04 13:38:22 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1d39d9737c4fc16d1e497b7171f16a2f6915216e [^]

Fixed issue 40995: BPLocation called without filters under specific circumstances

- Updated locationBillModel object with the billing address value

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0112544)
hgbot (developer)
2019-06-10 16:07

Repository: tools/automation/pi-mobile
Changeset: 356e6ae4b8b0f9945695d7b6874ca983dda6cf11
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jun 05 11:31:28 2019 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/356e6ae4b8b0f9945695d7b6874ca983dda6cf11 [^]

Related to issue 40995: 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/I40995_VerifyBPLocationModelMatchCustomerAddress.java
---
(0113332)
aaroncalero (manager)
2019-07-12 13:10

The issue is not fixed yet:
1. The query with the wrong/missing filters is still executed. There is even a warning in the browser console:
f4a182c98b49c251c603c54cb07af3cf.js:185 [dberror] OB.Dal.get: id not found.

2. If the customer has 2 different addresses (one for shipping and one for invoicing), the customer model that is set on the tickets ends up having the same address on both the shipping and invoicing addresses (locationModel and locationBillModel). This does not happen when the customer is assigned directly from the selector.
(0113487)
hgbot (developer)
2019-07-18 04:42

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: cc851a790e6811ed7ed76f93a2ddff87a7230a73
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Jul 16 23:31:59 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cc851a790e6811ed7ed76f93a2ddff87a7230a73 [^]

Fixed issue 40995: BPLocation called without filters under specific circumstances

- Updated locationModel object if shipping address is not undefined

---
M web/org.openbravo.retail.posterminal/js/model/businesspartner.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0113645)
aaroncalero (manager)
2019-07-25 10:11

The issue is not fixed yet. The main problem is still there:
The query with the missing filters is still executed. There is even a warning in the browser console:
f4a182c98b49c251c603c54cb07af3cf.js:185 [dberror] OB.Dal.get: id not found.

In an environment with big data (i.e. 200k customers) this query might try to retrieve 200k+ addresses.

When checking the problem, remember to configure the Enable Remote for Customer preference with value Y.
(0113802)
hgbot (developer)
2019-08-04 05:15

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 90fa52f23e8a5d876e29ff3e97cae6ca0fe2749a
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jul 31 17:42:34 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90fa52f23e8a5d876e29ff3e97cae6ca0fe2749a [^]

Fixed issue 40995: BPLocation called without filters under specific circumstances

- Updated locId value in customer object

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/customerdetailview.js
---

- Issue History
Date Modified Username Field Change
2019-05-31 15:04 aaroncalero New Issue
2019-05-31 15:04 aaroncalero Assigned To => Retail
2019-05-31 15:04 aaroncalero Resolution time => 1560117600
2019-05-31 15:04 aaroncalero Triggers an Emergency Pack => No
2019-06-03 14:54 rqueralta Assigned To Retail => rqueralta
2019-06-03 14:54 rqueralta Status new => scheduled
2019-06-05 15:22 hgbot Checkin
2019-06-05 15:22 hgbot Note Added: 0112424
2019-06-05 15:22 hgbot Status scheduled => resolved
2019-06-05 15:22 hgbot Resolution open => fixed
2019-06-05 15:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1d39d9737c4fc16d1e497b7171f16a2f6915216e [^]
2019-06-06 18:43 marvintm Review Assigned To => marvintm
2019-06-06 18:43 marvintm Status resolved => closed
2019-06-06 18:43 marvintm Fixed in Version => RR19Q3
2019-06-10 16:07 hgbot Checkin
2019-06-10 16:07 hgbot Note Added: 0112544
2019-07-12 13:10 aaroncalero Note Added: 0113332
2019-07-12 13:10 aaroncalero Status closed => new
2019-07-12 13:10 aaroncalero Resolution fixed => open
2019-07-12 13:10 aaroncalero Fixed in Version RR19Q3 =>
2019-07-18 04:42 hgbot Checkin
2019-07-18 04:42 hgbot Note Added: 0113487
2019-07-18 04:42 hgbot Status new => resolved
2019-07-18 04:42 hgbot Resolution open => fixed
2019-07-18 04:42 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1d39d9737c4fc16d1e497b7171f16a2f6915216e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cc851a790e6811ed7ed76f93a2ddff87a7230a73 [^]
2019-07-22 17:46 guilleaer Review Assigned To marvintm => guilleaer
2019-07-22 17:46 guilleaer Status resolved => closed
2019-07-22 17:46 guilleaer Fixed in Version => RR19Q4
2019-07-25 10:11 aaroncalero Note Added: 0113645
2019-07-25 10:11 aaroncalero Status closed => new
2019-07-25 10:11 aaroncalero Resolution fixed => open
2019-07-25 10:11 aaroncalero Fixed in Version RR19Q4 =>
2019-08-04 05:15 hgbot Checkin
2019-08-04 05:15 hgbot Note Added: 0113802
2019-08-04 05:15 hgbot Status new => resolved
2019-08-04 05:15 hgbot Resolution open => fixed
2019-08-04 05:15 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cc851a790e6811ed7ed76f93a2ddff87a7230a73 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90fa52f23e8a5d876e29ff3e97cae6ca0fe2749a [^]
2019-08-06 16:28 marvintm Review Assigned To guilleaer => marvintm
2019-08-06 16:28 marvintm Status resolved => closed
2019-08-06 16:28 marvintm Fixed in Version => RR19Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker