details:   /erp/devel/pi/rev/0472100cf1c8
changeset: 12086:0472100cf1c8
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue May 10 22:22:59 2011 +0200
summary:   Fixes issue 17063: Sales invoice: Create lines from is not working 
well

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
 |  6 ++++--
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
     |  2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 2045cb1d1e25 -r 0472100cf1c8 
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 May 10 18:52:45 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
      Tue May 10 22:22:59 2011 +0200
@@ -1023,15 +1023,17 @@
     var tabViewPane = null;
     
     // refresh the tabs
-    if (this.childTabSet && differentRecordId) {
+    if (this.childTabSet && (differentRecordId || 
!this.isOpenDirectModeParent)) {
       for (var i = 0; i < this.childTabSet.tabs.length; i++) {
         tabViewPane = this.childTabSet.tabs[i].pane;
         
-        if (!selectedRecordId || selectedRecordId !== 
tabViewPane.parentRecordId) {
+        if (!selectedRecordId || !this.isOpenDirectModeParent || 
selectedRecordId !== tabViewPane.parentRecordId) {
           tabViewPane.doRefreshContents(true); 
         }
       }
     }
+    delete this.isOpenDirectModeParent;
+    
     // and recompute the count:
     this.updateChildCount();
   },
diff -r 2045cb1d1e25 -r 0472100cf1c8 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Tue May 10 18:52:45 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Tue May 10 22:22:59 2011 +0200
@@ -548,6 +548,8 @@
         this.view.parentRecordId = this.data.get(0)[this.view.parentProperty];
 
         this.view.parentView.viewGrid.isOpenDirectMode = true;
+        // makes sure that the parent refresh will not fire back to cause a 
child refresh
+        this.view.parentView.isOpenDirectModeParent = true;
         // prevents opening edit mode for parent views
         this.view.parentView.viewGrid.isOpenDirectModeParent = true;
         this.view.parentView.viewGrid.targetRecordId = 
this.view.parentRecordId;

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to