Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048380Openbravo ERPI. Performancepublic2022-01-11 18:012022-03-08 16:41
ivazquez 
AugustoMauch 
highmajoralways
closedfixed 
5
 
PR22Q2 
Core
No
0048380: Performance issue when creating an order line
Ticket 34160

When trying to create an order and consequently an order line just after entering the "Sales Order" window and before the orders in that window are finished loading, an error occurs and the order is not created correctly, thus preventing the order line from being created either.

Talked to Augusto Mauch, he was given access to the test environment in order to reproduce the error.
Steps to reproduce:

1. Open sales order application. Sales order data is loading.
2. Immediately create new sales order, select Business Partner and save header.
After some time child line becomes disabled.

No tags attached.
? 2021-12-21-08-40-11.mp4 (2,415,200) 2022-01-11 18:01
https://issues.openbravo.com/file_download.php?file_id=16504&type=bug
Issue History
2022-01-11 18:01ivazquezNew Issue
2022-01-11 18:01ivazquezAssigned To => Triage Platform Base
2022-01-11 18:01ivazquezFile Added: 2021-12-21-08-40-11.mp4
2022-01-11 18:01ivazquezModules => Core
2022-01-11 18:01ivazquezTriggers an Emergency Pack => No
2022-01-11 18:04ivazquezDescription Updatedbug_revision_view_page.php?rev_id=23504#r23504
2022-01-11 18:05ivazquezDescription Updatedbug_revision_view_page.php?rev_id=23505#r23505
2022-01-14 19:47ivazquezETAnone => < 1 month
2022-02-20 11:31hgbotNote Added: 0135146
2022-02-21 07:47hgbotResolutionopen => fixed
2022-02-21 07:47hgbotStatusnew => closed
2022-02-21 07:47hgbotFixed in Version => PR22Q2
2022-02-21 07:47hgbotNote Added: 0135150
2022-02-21 07:47hgbotNote Added: 0135151
2022-03-08 16:41AugustoMauchAssigned ToTriage Platform Base => AugustoMauch

Notes
(0135146)
hgbot   
2022-02-20 11:31   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/530 [^]
(0135150)
hgbot   
2022-02-21 07:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: a3f4c1efc59263c7fb852443a226fb41f67bdcf8
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 20-02-2022 16:09:13
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/a3f4c1efc59263c7fb852443a226fb41f67bdcf8 [^]

Fixes ISSUE-48380: New records should no be created when the grid is being loaded

It should not be possible to create new records while a grid is being reloaded, because when the data load response is received, it
will delete from the local data the records that were created while the grid was loaded.

To disable the creation of new records the following actions have been done:
- The disable logic of the toolbar buttons now check if the grid is being loaded. To check it is uses the same logic ListGrid does, but
regretfully it is not included in a visible function so it needs to be repeated.
- The buttons are updated just before making a request to load the grid data, to let them react to the grid being loaded

Other considerations:
- These has been no need to disable record creation using short keys (Ctrl+i, Ctrl+d), because those were already not being applied when
the grid was loading
- There was already a call to updateButtonState when the datasource response is received.
- Buttons are properly reenabled when data is received, when there requests results in an exception in the backend and also when the request
times out
- Lazy filtering works properly, buttons are initially enabled and will not be disabled until the user explicitely load the grid

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0135151)
hgbot   
2022-02-21 07:47   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/530 [^]