Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043838Retail ModulesWeb POSpublic2020-04-23 12:232020-04-28 16:31
marvintm 
ranjith_qualiantech_com 
urgentmajorsometimes
closedfixed 
5
 
RR20Q3 
marvintm
Packaging and release
2020-01-30
main
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8581f1f793bc6812092f8d302693a332453a9db [^]
No
0043838: Business Partner location masterdata load is failing in WebPOS with a large amount of records
Currently the masterdata loading process is failing if the WebPOS has a large number of records in the business partner location table. The problem happens due to pagination, the same location is loaded twice, in different pages, and the insertion process fails because of the duplicated record.

The cause of the problem is that the query is using pagination by id, but in the following issue, the order criteria was changed to order by creation date.

https://issues.openbravo.com/view.php?id=43023 [^]

The change makes sense in the context of the remote mode, but it should not apply to the local model, there we need to enforce order by id.
- Having a large amount of business partner locations (by default, more than 10k, although this can be reduced by modifying the corresponding preference), try to log in the WebPOS.
- Notice that it fails because of a technical error, due to the fact that insertion of a location failed, because it was already inserted before.
We need to change the fix done in issue https://issues.openbravo.com/view.php?id=43023, [^] so that in local mode, we preserve and enforce the order by id regardless of any other consideration.
No tags attached.
depends on backport 0043839RR20Q2 closed ranjith_qualiantech_com Business Partner location masterdata load is failing in WebPOS with a large amount of records 
caused by defect 0043023 closed ranjith_qualiantech_com The loadBPLocations function of BusinessPartner model is not retrieving the last created/used BPLocation 
Issue History
2020-04-23 12:23marvintmNew Issue
2020-04-23 12:23marvintmAssigned To => Retail
2020-04-23 12:23marvintmTriggers an Emergency Pack => No
2020-04-23 12:23marvintmRegression level => Packaging and release
2020-04-23 12:23marvintmRegression date => 2020-01-30
2020-04-23 12:23marvintmRegression introduced in release => main
2020-04-23 12:23marvintmRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8581f1f793bc6812092f8d302693a332453a9db [^]
2020-04-23 12:30ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-04-23 12:34ranjith_qualiantech_comStatusnew => scheduled
2020-04-24 02:50hgbotCheckin
2020-04-24 02:50hgbotNote Added: 0119375
2020-04-24 02:50hgbotStatusscheduled => resolved
2020-04-24 02:50hgbotResolutionopen => fixed
2020-04-24 02:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/834dde2ae9cc34c00f96b167844d37c948867f61 [^]
2020-04-24 20:41dmitry_mezentsevRelationship addedcaused by 0043023
2020-04-28 16:31marvintmReview Assigned To => marvintm
2020-04-28 16:31marvintmStatusresolved => closed
2020-04-28 16:31marvintmFixed in Version => RR20Q3

Notes
(0119375)
hgbot   
2020-04-24 02:50   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 834dde2ae9cc34c00f96b167844d37c948867f61
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Apr 24 06:20:12 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/834dde2ae9cc34c00f96b167844d37c948867f61 [^]

Fixed issue-43838 : Location query ordered by id to improve pagination performance

* For Remote mode, location query should be ordered by last updated date or custom orderBy cluase
* For nonremote mode, location query should be ordered by id to improve pagination performance

---
M src/org/openbravo/retail/posterminal/POSUtils.java
M src/org/openbravo/retail/posterminal/master/BPLocation.java
---