details:   /erp/devel/pi/rev/ce7f1e954dc1
changeset: 10958:ce7f1e954dc1
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Mar 01 22:28:34 2011 +0100
summary:   Parent properties from getcontextinfo should not overwrite null 
child context info

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r ebab3fcc4d47 -r ce7f1e954dc1 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
      Tue Mar 01 22:19:29 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
      Tue Mar 01 22:28:34 2011 +0100
@@ -1515,7 +1515,7 @@
         value = record[propertyObj.property];
         field = component.getField(propertyObj.property);
         addProperty = propertyObj.sessionProperty || !onlySessionProperties;
-        if (typeof value !== 'undefined' && addProperty) {
+        if (addProperty) {
           if (classicMode) {
             if (propertyObj.type && convertToClassicFormat) {
               type = SimpleType.getType(propertyObj.type);
@@ -1559,8 +1559,9 @@
     }
     
     if (this.parentView) {
-      // note parent properties do not overwrite child properties
-      contextInfo = isc.addProperties(this.parentView.getContextInfo(true, 
classicMode, forceSettingContextVars, convertToClassicFormat), contextInfo);
+      // parent properties do not override contextInfo
+      var parentContextInfo = 
this.parentView.getContextInfo(onlySessionProperties, classicMode, 
forceSettingContextVars, convertToClassicFormat);
+      contextInfo = isc.addProperties(parentContextInfo, contextInfo);
     }
     
     return contextInfo;

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to