Fixed bug 31198:RO logic doesn't work properly in grid view with combo fields
authorInigo Sanchez <>
Fri, 30 Oct 2015 13:15:08 +0100
changeset 27819 543f652781a2
parent 27818 e4c74a0ac40e
child 27820 4eceadac7f74
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.
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Mon Nov 02 11:28:15 2015 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Fri Oct 30 13:15:08 2015 +0100
@@ -3720,6 +3720,14 @@
+  // Set "allowEditCellRefresh" parameter to force a completely
+  // redrawn in combo type fields when refreshing an editing cell
+  // with the the focus on it.
+  // See issue
+  refreshCell: function (rowNum, colNum, refreshingRow) {
+    return this.Super('refreshCell', [rowNum, colNum, refreshingRow, true]);
+  },
   // having a valueMap property results in setValueMap to be called
   // on an item. On items with a picklist this causes calls to the
   // server side