details:   https://code.openbravo.com/erp/devel/pi/rev/51672575b04f
changeset: 19790:51672575b04f
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Feb 25 11:05:03 2013 +0100
summary:   Fixes issue 23154: Read only logic is working as expected.

In the fix of issue 23068 a change was made so that the current values of the 
form were not changed to '' if they were originally null. The problem is that 
the read only logic depended on this to work. This has been fixed by fixing the 
values inside the onFieldChanged function, the same way it was fixed for the 
display logc in the issue 23068.

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
 |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r ddfd1c8e6194 -r 51672575b04f 
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
       Fri Feb 22 09:21:08 2013 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-form.js.ftl
       Mon Feb 25 11:05:03 2013 +0100
@@ -35,8 +35,9 @@
       onFieldChanged: function(form, item, value) {
         var f = form || this,
             context = this.view.getContextInfo(false, true),
-            currentValues = f.view.getCurrentValues(), otherItem,
+            currentValues = isc.shallowClone(f.view.getCurrentValues()), 
otherItem,
             disabledFields, i;
+            OB.Utilities.fixNull250(currentValues);
         <#list data.fieldHandler.fields as field>
         <#if field.readOnlyIf != "">
             f.disableItem('${field.name}', ${field.readOnlyIf});

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to