Check if a reference is a parent reference before considering it a button reference
authorAntonio Moreno <antonio.moreno@openbravo.com>
Mon, 13 Dec 2010 11:12:04 +0100
changeset 9095 6014c98ee274
parent 9094 e4abe4aaf43c
child 9096 f0e7e3fce561
Check if a reference is a parent reference before considering it a button reference
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java	Mon Dec 13 10:43:22 2010 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java	Mon Dec 13 11:12:04 2010 +0100
@@ -161,7 +161,8 @@
       for (Column column : columnQry.list()) {
         final String referenceId;
         if (column.getReferenceSearchKey() != null) {
-          if (DalUtil.getId(column.getReference()).equals("28")) {
+          if (DalUtil.getId(column.getReference()).equals("28")
+              && !column.getReferenceSearchKey().isBaseReference()) {
             // This reference is a button reference. We will add it to the button references
             localButtonReferences.add(column.getReferenceSearchKey());
             localButtonColumns.add(column.getId());