details:   https://code.openbravo.com/erp/devel/pi/rev/f9da9c951a5d
changeset: 32707:f9da9c951a5d
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Sep 18 10:20:43 2017 +0200
summary:   Related with issue 36725: Prevents error when opening direct subtab

The following case was not working:
- Open Window, Tabs and Fields
- Select any field, open it in form view
- Click on the "Column" field title. It should open the Tables and Columns 
window and focus on the Column tab, but it will fail.

This happens because it was not enough to check if 
this.parentView.viewGrid.getSelectedRecord() was null, it could also be 
undefined.

diffstat:

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

diffs (12 lines):

diff -r bd3b87f44dea -r f9da9c951a5d 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Mon Sep 18 09:40:40 2017 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Mon Sep 18 10:20:43 2017 +0200
@@ -3159,7 +3159,7 @@
 
   roleHasWriteAccessToParentRecordOrg: function () {
     var parentRecordOrganization;
-    if (this.parentView === null || 
this.parentView.viewGrid.getSelectedRecord() === null) {
+    if (this.parentView === null || 
this.parentView.viewGrid.getSelectedRecord() === null || 
this.parentView.viewGrid.getSelectedRecord() === undefined) {
       return true;
     }
     parentRecordOrganization = 
this.parentView.viewGrid.getSelectedRecord().organization;

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to