details:   https://code.openbravo.com/erp/devel/pi/rev/b8767fc628fd
changeset: 26917:b8767fc628fd
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Mon Jun 15 09:18:59 2015 +0200
summary:   Related to issue 30132: Updated condition to use the same as 
OBViewTab

Updated the condition to use the same as OBViewTab in getParentProperty() 
method, to retrieve the parent property when the parent tab and the child tab 
use the same table

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
 |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r f66a9b5797bd -r b8767fc628fd 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
     Sun Jun 14 17:57:15 2015 +0000
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
     Mon Jun 15 09:18:59 2015 +0200
@@ -414,9 +414,12 @@
       return null;
     }
     String parentProperty = null;
-    // If the parentTab uses the same table, we don't do nothing because the 
id is the parent
-    // property and it is always included
-    if (!tab.getTable().getId().equals(parentTab.getTable().getId())) {
+    if (tab.getTable().getId().equals(parentTab.getTable().getId())
+        && ("RO".equals(tab.getUIPattern()) || 
"SR".equals(tab.getUIPattern()))) {
+      if (entity.getIdProperties().size() > 0) {
+        parentProperty = entity.getIdProperties().get(0).getName();
+      }
+    } else {
       parentProperty = ApplicationUtils.getParentProperty(tab, parentTab);
     }
     return parentProperty;

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to