Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032193Openbravo ERPA. Platformpublic2016-02-10 19:202016-03-17 10:56
caristu 
caristu 
normalmajoralways
closedfixed 
5
 
3.0PR16Q2 
alostale
Core
No
0032193: Selection is not working properly in P&E grids having filter on change option set to N
Selection is not working properly in P&E grids having filter on change option set to N

This problem is happening because the onblur event of the filter is firing the filtering without having the selection updated.
1. As System Administrator, access Grid Configuration at Window/Tab/Field Level and configure:
  * tab= Order Invoices - Order Invoice P&E
  * Filter on change= no
2. Logout and login
3. Access Payment In window
4. Remove all filters. Add a new filter in the Invoice No. field and press enter to show a few records.
5. Select one record.
5. Put the focus in the filter of the Invoice No. again, change the criteria but do not press enter
6. Without pressing any key, try to click one or several records quickly. Notice that after that the following error appears in the log: "Uncaught BigDecimal(): Not a number: n,u,l,l"
No tags attached.
related to defect 00320913.0PR16Q2 closed caristu The Order/Invoices grid in Add Details must always sort by selected records first 
related to defect 00319893.0PR16Q2 closed caristu Wrong behavior in order/invoices grid in Add Payment process definition when having >100 records selected 
related to defect 0032287 closed caristu Selection can be lost in P&E grids having an amount of data higher than the page size 
Issue History
2016-02-10 19:20caristuNew Issue
2016-02-10 19:20caristuAssigned To => platform
2016-02-10 19:20caristuModules => Core
2016-02-10 19:20caristuTriggers an Emergency Pack => No
2016-02-11 09:30caristuSeverityminor => major
2016-02-11 09:30caristuAssigned Toplatform => caristu
2016-02-11 09:31caristuStatusnew => scheduled
2016-02-11 11:16caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11066#r11066
2016-02-11 11:53caristuNote Added: 0084099
2016-02-11 11:54caristuRelationship addedrelated to 0032091
2016-02-11 11:55caristuRelationship addedrelated to 0031989
2016-02-18 08:53caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11157#r11157
2016-02-18 08:53caristuNote Edited: 0084099bug_revision_view_page.php?bugnote_id=0084099#r11159
2016-02-19 10:48hgbotCheckin
2016-02-19 10:48hgbotNote Added: 0084348
2016-02-19 10:48hgbotStatusscheduled => resolved
2016-02-19 10:48hgbotResolutionopen => fixed
2016-02-19 10:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7bf02275324819d0340fd907ba6795c0143b699c [^]
2016-02-19 11:23caristuRelationship addedrelated to 0032287
2016-02-19 11:27caristuReview Assigned To => alostale
2016-02-19 11:27caristuIssue Monitored: alostale
2016-02-26 09:43alostaleNote Added: 0084546
2016-02-26 09:43alostaleStatusresolved => closed
2016-02-26 09:43alostaleFixed in Version => 3.0PR16Q2
2016-03-17 10:56hudsonbotCheckin
2016-03-17 10:56hudsonbotNote Added: 0085151

Notes
(0084099)
caristu   
2016-02-11 11:53   
(edited on: 2016-02-18 08:53)
The problem is caused because the OB.APRM.AddPayment.doSelectionChanged is launching some methods (for example updateInvOrderTotal) to calculate the values of the window.

Having filter on change option set to N, the onblur event can launch a filtering request, if at the same time we select some records when the selectionChange is fired it is possible that the local data of the grid is not ready.

(0084348)
hgbot   
2016-02-19 10:48   
Repository: erp/devel/pi
Changeset: 7bf02275324819d0340fd907ba6795c0143b699c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Feb 19 10:44:55 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7bf02275324819d0340fd907ba6795c0143b699c [^]

fixes issue 32193: Fix selection in P&E grids having filter on change disabled

Having filter on change disabled, the filtering is not performed until enter is pressed or the focus is moved out of the text filter. In this second case, there could be problems if the focus is lost when checking a pick and edit grid record: the filtering request is performed and at the same time the actions related to the record selection are fired. This can cause the selection actions not work as expected.

This problem also affects to numeric and date filters, because they always perform the filtering after losing the focus.

To avoid this problem a new mechanism has been included for pick and edit grids, the blur method for the filter elements is overridden to prevent the selection immediately after losing the focus.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-text.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
---
(0084546)
alostale   
2016-02-26 09:43   
code reviewed + tested
(0085151)
hudsonbot   
2016-03-17 10:56   
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/b22fb0500156 [^]
Maturity status: Test