Notes |
|
|
All of fields which are drawn as checkboxes and are not displayed in the view form but are displayed in the grid are affected by this issue. When the checkbox is checked/unchecked the field doesn't get the focus. It cause that the change is not taken into account when the line is saved.
Other example:
Product/translation/active |
|
|
(0047422)
|
hgbot
|
2012-04-10 15:31
|
|
Repository: erp/devel/pi
Changeset: a3dca3d3f0b9df34048d7e10611268b4a89b9df1
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Apr 10 15:04:03 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a3dca3d3f0b9df34048d7e10611268b4a89b9df1 [^]
fixed issue 20192: Fields which aren shown in grid but hidden in form can be edited.
Some properties of the grid fields in edit mode are taken from form view. In this case the property visible (true for the grid but false for the form) was take from form view and the the field in the grid (edit mode) doesn't accepts the focus
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
|
|
|
|
Test Plan:
Follow the steps to reproduce and check that all is working fine.
This fix is not risky |
|
|
|
|
|
|
Instead of resetting the value of the visible property, I think it would be better to prevent it from being changed.
The current problem is that after using the 'showInRelation' property to make that field visible in the grid, the setFieldFormProperties function is being called. This function, seeing that the 'displayed' property of the field is false, change again its visibility to 'false'. This change does not prevent the field from being shown in the grid, it just messes up the focus behaviour.
Proposed solution: modify the setFieldFormProperty function signature to:
setFieldFormProperties: function (fld, isGridField).
Then, only use the displayed property to change the visibility when it is not a grid field:
if (fld.displayed && !isGridField) {
...
}
It will only be needed to set this argument when the method is called from the prepareGridFields function. If the function is called withoug setting the isGridField argument its behaviour will be the same as always, because !isGridField will evaluate as true. |
|
|
(0047927)
|
hgbot
|
2012-04-24 17:07
|
|
Repository: erp/devel/pi
Changeset: 8f215938f06ada86a29724bb03d2e33abf75ad34
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Apr 24 17:06:29 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8f215938f06ada86a29724bb03d2e33abf75ad34 [^]
Related to issue 20192: adding a parameter to setFieldFormProperties
Before the fix, when a field is not shown in form view but displayed in grid view, the property editorProperties.visible is changed by setFieldFormProperties function. This value in the property doesn't allow to the field to get the focus in grid view. To solve it, a second parameter has been added to the function and setted as true in the affected call. If the function is called without setting the new argument its behaviour will be the same as always.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
|
|
|
|
Code reviewed and verified in pi@52d3acc5d1d4. |
|
|
|
|