Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020537Openbravo ERPA. Platformpublic2012-05-17 11:512012-06-21 15:41
mtaal 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
3.0MP13 
Core
No
0020537: Grid editing: field shows short error border when opening a grid line for editing
I noticed that when I start editing an existing line in grid that a short error border is shown, it happens on the quantity field.
Open sales invoice window
Goto lines tab
Create a new line
put the focus in the quantity field (or another required field)
Save it
Then start editing this same line
When starting editing the quantity field shows an error border for a short time
I think it has to do with the following:
- when saving the grid hides the form
- the last focus item stays set in the form, it is a required item
- when the form is opened again the system starts with an empty form
- but immediately moves the focus to another item
- which fires validation on the required field

To solve this, when the form gets hidden set the focus item of the grid editing form to null
form.setFocusItem(null)

This can be done in the ob-view-grid.hideInlineEditor method somewhere in the if (editForm) if statement maybe.
No tags attached.
Issue History
2012-05-17 11:51mtaalNew Issue
2012-05-17 11:51mtaalAssigned To => alostale
2012-05-17 11:51mtaalModules => Core
2012-05-22 14:09alostaleTarget Version3.0MP12 =>
2012-06-04 10:55AugustoMauchAssigned Toalostale => AugustoMauch
2012-06-04 11:02hgbotCheckin
2012-06-04 11:02hgbotNote Added: 0049599
2012-06-04 11:02hgbotStatusnew => resolved
2012-06-04 11:02hgbotResolutionopen => fixed
2012-06-04 11:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b5f0e719c9c220710f8f15400577e913443d1d89 [^]
2012-06-21 15:41alostaleNote Added: 0049985
2012-06-21 15:41alostaleStatusresolved => closed
2012-06-21 15:41alostaleFixed in Version => 3.0MP13

Notes
(0049599)
hgbot   
2012-06-04 11:02   
Repository: erp/devel/pi
Changeset: b5f0e719c9c220710f8f15400577e913443d1d89
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jun 04 11:01:30 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b5f0e719c9c220710f8f15400577e913443d1d89 [^]

Fixes issue 20537: Wrong validation is not launched

When a row was saved, the last focused item was being stored. When that same line was opened to be edited, the validation was launched before fetching the row values, showing an error border on the last focused item. When the row values were fetched, the border went back to normal.

Now, when the form is hidden, it set to null the last focused item, preventing the wrong validation from beig launched.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0049985)
alostale   
2012-06-21 15:41   
code reviewed and verified in pi@20d1a6b019e0