Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020192Openbravo ERPA. Platformpublic2012-04-03 12:042012-04-26 19:32
naiaramartinez 
guilleaer 
normalminorhave not tried
closedfixed 
5
 
3.0MP11 
Core
No
0020192: You can't change the value of active field in grid view
You can't change the value of active field in grid view in accounting tab Business Partner Category window.

Go to Business Partner Category window.
Select a record and go to accounting tab.
Set grid view.
Edit active field and set active=no.
Save the record.
Youcan see that the value is not changing. the value is always active=yes.
No tags attached.
Issue History
2012-04-03 12:04naiaramartinezNew Issue
2012-04-03 12:04naiaramartinezAssigned To => alostale
2012-04-03 12:04naiaramartinezModules => Core
2012-04-03 13:14alostaleAssigned Toalostale => guilleaer
2012-04-04 17:13guilleaerNote Added: 0047394
2012-04-10 15:31hgbotCheckin
2012-04-10 15:31hgbotNote Added: 0047422
2012-04-10 15:31hgbotStatusnew => resolved
2012-04-10 15:31hgbotResolutionopen => fixed
2012-04-10 15:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a3dca3d3f0b9df34048d7e10611268b4a89b9df1 [^]
2012-04-10 15:59guilleaerNote Added: 0047426
2012-04-17 05:31hudsonbotCheckin
2012-04-17 05:31hudsonbotNote Added: 0047619
2012-04-20 14:03AugustoMauchNote Added: 0047793
2012-04-24 17:07hgbotCheckin
2012-04-24 17:07hgbotNote Added: 0047927
2012-04-26 12:48AugustoMauchNote Added: 0048019
2012-04-26 12:48AugustoMauchStatusresolved => closed
2012-04-26 12:48AugustoMauchFixed in Version => 3.0MP11
2012-04-26 19:32hudsonbotCheckin
2012-04-26 19:32hudsonbotNote Added: 0048084

Notes
(0047394)
guilleaer   
2012-04-04 17:13   
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
---
(0047426)
guilleaer   
2012-04-10 15:59   
Test Plan:
Follow the steps to reproduce and check that all is working fine.

This fix is not risky
(0047619)
hudsonbot   
2012-04-17 05:31   
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/cedf57621434 [^]

Maturity status: Test
(0047793)
AugustoMauch   
2012-04-20 14:03   
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
---
(0048019)
AugustoMauch   
2012-04-26 12:48   
Code reviewed and verified in pi@52d3acc5d1d4.
(0048084)
hudsonbot   
2012-04-26 19:32   
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/70a717a9ffa1 [^]

Maturity status: Test