Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031198Openbravo ERPA. Platformpublic2015-10-21 12:592015-11-23 21:16
umartirena 
inigosanchez 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0031198: Read Only logic does not work properly in grid view with combo type fields.
Read Only logic does not work properly in grid view with combo type fields. If there are two fields on a grid, one having List as a reference and the second one being a tabledir and the second one has a read only logic based on the value of the first one, the second one does not work properly. When should be read only, it gets read only without any problem, but when turns editable the combo is not completely redrawn (the little arrow does not appear) and the combo is not filtered if any value is entered there.
-Create two fields on a window:
 * First one as a List.
 * Second one as a Tabledir.
-Add a readonly logic on the second one based on first one.
-Be sure that the value by default in the List is the one that makes the second field to be read only.
-Be sure also that 'List' field must be next to (leftside) of the 'TableDir' field.
-Go to the window and in grid view add a record.Check that the second field is read only.
-Change the value in the first field. Check that the second field turns editable, but the combo is not completely redrawn (the little arrow does not appear), and if any value is entered in the filter no values are displayed in the combo.

Note1: In the pictures it can see that 'List' field is not next to (leftside) of the 'TableDir' field but this is because the intermediate fields are not editables (RO).
Note2: If the second field is a 'List' instead of a 'TableDir' (Both 'List' fields) the behaviour is the same as described in the issue.
No tags attached.
related to defect 0035658 closed inigosanchez Fields redraws in grid view when a numeric field is referenced by a read only logic 
png Screenshot1.png (35,622) 2015-10-21 13:03
https://issues.openbravo.com/file_download.php?file_id=8605&type=bug
png

png Screenshot2.png (35,394) 2015-10-21 13:03
https://issues.openbravo.com/file_download.php?file_id=8606&type=bug
png

png Screenshot3.png (35,753) 2015-10-21 13:03
https://issues.openbravo.com/file_download.php?file_id=8607&type=bug
png

? issue31198.export (2,304) 2015-10-30 13:17
https://issues.openbravo.com/file_download.php?file_id=8669&type=bug
Issue History
2015-10-21 12:59umartirenaNew Issue
2015-10-21 12:59umartirenaAssigned To => platform
2015-10-21 12:59umartirenaModules => Core
2015-10-21 12:59umartirenaTriggers an Emergency Pack => No
2015-10-21 13:03umartirenaFile Added: Screenshot1.png
2015-10-21 13:03umartirenaFile Added: Screenshot2.png
2015-10-21 13:03umartirenaFile Added: Screenshot3.png
2015-10-22 16:00alostaleStatusnew => scheduled
2015-10-22 16:00alostaleAssigned Toplatform => inigosanchez
2015-10-27 18:23inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9940#r9940
2015-10-28 13:33inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9950#r9950
2015-10-30 12:34inigosanchezIssue Monitored: alostale
2015-10-30 12:34inigosanchezNote Added: 0081401
2015-10-30 13:17inigosanchezFile Added: issue31198.export
2015-11-02 13:18hgbotCheckin
2015-11-02 13:18hgbotNote Added: 0081436
2015-11-02 13:18hgbotStatusscheduled => resolved
2015-11-02 13:18hgbotResolutionopen => fixed
2015-11-02 13:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/543f652781a23ae2d4bda64983e346a171e92df0 [^]
2015-11-02 13:19alostaleReview Assigned To => alostale
2015-11-02 13:22alostaleNote Added: 0081437
2015-11-02 13:22alostaleStatusresolved => closed
2015-11-02 13:22alostaleFixed in Version => 3.0PR16Q1
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082165
2017-04-18 14:32inigosanchezRelationship addedrelated to 0035658

Notes
(0081401)
inigosanchez   
2015-10-30 12:34   
Added tests in TestLink [1]:
*Platform > [ROL] Read Only Logic > [ROLa] Read Only in grid:
-ROLa010 RO with combo type fields.
-ROLa020 RO with combo type fields on focus. (I)
-ROLa030 RO with combo type fields on focus. (II)
*Platform > [ROL] Read Only Logic > [ROLb] Read Only in form.
-ROLb010 RO with combo type fields.
-ROLb020 RO with combo type fields on focus. (I)
-ROLb030 RO with combo type fields on focus. (II)


[1] https://testlink.openbravo.com/testlink [^] [^]
(0081436)
hgbot   
2015-11-02 13:18   
Repository: erp/devel/pi
Changeset: 543f652781a23ae2d4bda64983e346a171e92df0
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Oct 30 13:15:08 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/543f652781a23ae2d4bda64983e346a171e92df0 [^]

Fixed bug 31198:RO logic doesn't work properly in grid view with combo fields

The problem was that Read Only logic did not work properly in grid view with
combo type fields. If there were two fields on a grid, one having 'List' as
a reference and the second one been a 'TableDir' and the second one had a read
only logic based on the value of the first one, the second one did not work
properly. This happend when 'List' field was next to (leftside) of the
'TableDir' field or if there were intermediate fields between 'List' and
'TableDir' fields that were not editables (RO).

The problem has been fixed overriding a 'refreshCell()' method to use
'allowEditCellRefresh' parameter. This parameter is taking into account in
'refreshCellValue()' method of SC and if there is a visible editor in the
cell with the focus on it, redrawing and update it's value.

This fix take into account when 'refreshCell()' method is called with a value
in 'allowEditCellRefresh' parameter and in this case it will not be called
the overridden method to avoid delete some preexisting correct fluxes.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0081437)
alostale   
2015-11-02 13:22   
code reviewed
tested:

- Issue as reported
- Additional test cases added to test link (see above)
- No extra requests are performed on refresh
(0082165)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test