Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035682Openbravo ERP07. Sales managementpublic2017-04-04 11:382017-05-29 17:43
JONHM 
markmm82 
highmajorsometimes
closedfixed 
5
3.0PR16Q4.2 
3.0PR17Q3 
aferraz
Core
No
0035682: Return From Customer pick and edit is very slow with big data
with big data, the query executed during pick&edit process, in Return From Customer window, the response time is high, almost 3 minutes.

We have applied the configuration
  - Add restriction in "Product - Pick / Edit Lines - RFC/RTV HQL Pick / Edit Lines" field to "Allow filtering by FK identifier" No
and we have applied the changeset of issue 34031, but the problem persists
with big data
go to Return From Customer window
select the record of Business Partner 'CC000 - Cliente Publico'
click in pick & Edit process
No tags attached.
related to defect 0034031 closed AtulOpenbravo Return From Customer pick and edit is very slow with big data 
related to defect 0032949 closed AtulOpenbravo performance problem in pick and execute of Return to Vendor: RFC/RTV HQL Pick / Edit Lines 
related to defect 0034839 closed rqueralta Not possible to select a shipment in RFC window if that shipment has not been created from an order. 
related to design defect 00346123.0PR17Q1 closed vmromanos Performance problem in Return To Vendor Shipment 
has duplicate defect 0037088 closed Triage Omni OMS Pick and edit of return to vendor not working properly 
blocks design defect 0039815 scheduled markmm82 Module script UpdateIsCompletelyInvoiced cannot be executed due to poor performance 
txt RFCperformance.txt (47,041) 2017-04-04 11:38
https://issues.openbravo.com/file_download.php?file_id=10645&type=bug
Issue History
2017-04-04 11:38JONHMNew Issue
2017-04-04 11:38JONHMAssigned To => Triage Finance
2017-04-04 11:38JONHMFile Added: RFCperformance.txt
2017-04-04 11:38JONHMModules => Core
2017-04-04 11:38JONHMResolution time => 1493071200
2017-04-04 11:38JONHMTriggers an Emergency Pack => No
2017-04-04 12:26JONHMRelationship addedrelated to 0034031
2017-04-04 12:26aferrazRelationship addedrelated to 0032949
2017-04-04 12:28aferrazRelationship addedrelated to 0034839
2017-04-04 12:29aferrazRelationship addedrelated to 0034612
2017-04-04 12:31aferrazAssigned ToTriage Finance => markmm82
2017-04-04 16:56heccamIssue Monitored: heccam
2017-04-17 18:37markmm82Statusnew => scheduled
2017-04-27 17:11markmm82Note Added: 0096236
2017-04-27 21:01hgbotCheckin
2017-04-27 21:01hgbotNote Added: 0096241
2017-04-27 21:01hgbotStatusscheduled => resolved
2017-04-27 21:01hgbotResolutionopen => fixed
2017-04-27 21:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3f0bb1b574c3f9c2c6ea59f41c0548c977a8f013 [^]
2017-04-27 21:06aferrazReview Assigned To => aferraz
2017-04-27 21:06aferrazNote Added: 0096244
2017-04-27 21:06aferrazStatusresolved => closed
2017-04-27 21:06aferrazFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096913
2017-10-24 12:35JONHMRelationship addedhas duplicate 0037088
2018-12-17 12:34adrianromeroRelationship addedblocks 0039815

Notes
(0096236)
markmm82   
2017-04-27 17:11   
In environment with big data

Test Plan 1:
  Go to Return From Customer window
  Select the record of Business Partner 'CC000 - Cliente Publico'
  Click in pick & Edit process and notice grid is loaded in about 7 seconds.

Test Plan 2 (testing scenario of 34839):
As F&B International Group Admin

 - Go to Product window
   Create a new one named Product 1 for F&B España.
   Enter a purchase price list (Tarifa Bebidas Alegres) and a sales price list (Tarifa de Ventas) in tab "Price".
   Enter any unit and list price.

 - Go to Purchase Order window
   Create a new one for F&B España, Bebidas Alegres business partner.
   Go to Lines and select the product. Enter an ordered Qty = 500 Units.
   Book the order.

 - Go to Goods Receipt window
   Create a new one for F&B España, Bebidas Alegres business partner.
   Use Create Lines From. Select the order. Enter a storage bin (RN-0-0-0) and receipt all quanity.
   Complete the receipt.

 - Go to Sales Order window
   Create a new one for F&B España, Alimentos y Supermercados business partner.
   Go to Lines and select Product 1. Enter an ordered quantity = 10.
   Book the order.

 - Go to Goods Shipment window
   Create a new one for F&B España, Alimentos y Supermercados business partner.
   Use Create Lines From. Select the sales order just created. Enter a warehouse position RN-0-0-0, and select all lines. Press OK.
   Complete the shipment. Write down shipment order number 210, for instance.

 - In Goods Shipment window create another one for F&B España, Alimentos y Supermercados business partner.
   Go to lines tab and create a new one. Select Product 1. Change Movement quantity to 15. Storage bin RN-0-0-0.
   Complete the shipment. Write down shipment order number 211, for instance.
 
 - Go to Return from Customer window
   Create a new one for F&B España, Alimentos y Supermercados business partner.
   Click on Pick/Edit Lines.

 - Verify that shipment number 210 (the one created from the sales order) is shown, and that shipment number 211 (the one created from scrath) is shown too.
(0096241)
hgbot   
2017-04-27 21:01   
Repository: erp/devel/pi
Changeset: 3f0bb1b574c3f9c2c6ea59f41c0548c977a8f013
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Apr 27 10:46:56 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/3f0bb1b574c3f9c2c6ea59f41c0548c977a8f013 [^]

Fixes issue 35682: Return From Customer pick and edit is slow with big data

With big data, the query executed during Pick & Edit process, in Return From Customer
window, the response time is high, almost 3 minutes.

To improve the performance was redefined the query in ReturnFromCustomerHQLInserter.java
to use the NOT EXISTS function instead of use of SELECT query to only see if doesn't
exists lines with discounts. It also avoid the translation hibernate was doing to a
query with join between c_orderline and c_order_discount tables, and avoid iterate
all c_orderline records if any exists with a discount related.

---
M src/org/openbravo/common/datasource/ReturnFromCustomerHQLInserter.java
---
(0096244)
aferraz   
2017-04-27 21:06   
Code review + Testing OK
(0096913)
hudsonbot   
2017-05-29 17:43   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^]
Maturity status: Test