(0088821)
|
hgbot
|
2016-08-04 15:27
|
|
Repository: erp/devel/pi
Changeset: 12e245f1bfeaa36650801918365d0f04cb70be2c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Aug 04 15:18:01 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/12e245f1bfeaa36650801918365d0f04cb70be2c [^]
fixes issue 33618: Unneeded datasource requests having summary functions
After editing a record in grid view, having summary functions, several DS request were fired. This was happening when processing the FIC return: setting the values for each field was causing a datasource call for refreshing the summaries, because Smartclient detected that the grid summary record was displayed. This wrong behavior also affected when editing manually the fields in grid view.
To fix this problem, if the summary record is displayed, we prevent those calls by setting the showGridSummary property of the grid to false, therefore Smartclient will not fire those unneeded requests. And once the edit function has finished we restore the value.
Together with this, there were some additional requests being fired when saving/updating a record in grid view. This was happening because the getSummaryRow() was being used to refresh the summaries but at the same time, the dataChanged function of the grid was indeed doing the same.
To solve this second problem, we just invoke getSummaryRow() when saving a new record in grid view, because this is the only case where the dataChanged function was not firing the request for refreshing the summaries.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
|
|