Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045883Retail ModulesWeb POSpublic2021-02-11 10:082021-02-19 08:01
malsasua 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR21Q2 
No
0045883: External Order Loader: warehouse is not selected following the priority
In External Order Loader, when the warehouse is not informed in the json, it is calculated in External Order Loader.

But the query to get the warehouse is ignoring the priority of warehouses.
. change the VallBlanca warehouse configuration as attachment vallblancaWarehouses

. load external Order Loader without warehouse selected (json attachment)

. the sales order created is with warehouse "Vall Blanca Store Warehouse" and it should be White Valley Spain Distribution Center
change https://gitlab.com/openbravo/devel/pmods/org.openbravo.retail.posterminal/-/blob/master/src/org/openbravo/retail/posterminal/ExternalOrderLoader.java#L1286 [^]
by:

      Warehouse wh = posTerminal.getOrganization().getObretcoMWarehouse();
      if (wh == null && !posTerminal.getOrganization().getOrganizationWarehouseList().isEmpty()) {
        OBQuery<OrgWarehouse> warehouses = OBDal.getInstance()
              .createQuery(OrgWarehouse.class,
                  " e where e.organization=:org and e.warehouse.active=true order by priority, id");
        warehouses.setNamedParameter("org", posTerminal.getOrganization());
        List<OrgWarehouse> warehouseList = warehouses.list();
        if (warehouseList.size() != 0) {
          wh = warehouseList.get(0).getWarehouse();
        }
No tags attached.
png vallblancaWarehouses.png (174,727) 2021-02-11 10:08
https://issues.openbravo.com/file_download.php?file_id=15313&type=bug
png

png salesOrder.png (88,048) 2021-02-11 10:09
https://issues.openbravo.com/file_download.php?file_id=15314&type=bug
png

? order.json (1,460) 2021-02-11 10:09
https://issues.openbravo.com/file_download.php?file_id=15315&type=bug
Issue History
2021-02-11 10:08malsasuaNew Issue
2021-02-11 10:08malsasuaAssigned To => Retail
2021-02-11 10:08malsasuaFile Added: vallblancaWarehouses.png
2021-02-11 10:08malsasuaResolution time => 1614639600
2021-02-11 10:08malsasuaTriggers an Emergency Pack => No
2021-02-11 10:09malsasuaFile Added: salesOrder.png
2021-02-11 10:09malsasuaFile Added: order.json
2021-02-15 05:38ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-02-15 12:48ranjith_qualiantech_comStatusnew => scheduled
2021-02-17 13:42hgbotNote Added: 0126140
2021-02-19 08:01hgbotNote Added: 0126180
2021-02-19 08:01hgbotResolutionopen => fixed
2021-02-19 08:01hgbotStatusscheduled => closed
2021-02-19 08:01hgbotFixed in Version => RR21Q2
2021-02-19 08:01hgbotNote Added: 0126181

Notes
(0126140)
hgbot   
2021-02-17 13:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/305 [^]
(0126180)
hgbot   
2021-02-19 08:01   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/305 [^]
(0126181)
hgbot   
2021-02-19 08:01   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 704d6db0ef81053ad6223c2e7d37478f7044e3cb
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-02-19T07:01:40+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/704d6db0ef81053ad6223c2e7d37478f7044e3cb [^]

Fixed ISSUE-45883: Updated Logic to get Org Warehouse in EOL
* Warehouse for EOL should be fetched from Org Warehouse based on active status and priority

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
---