fixed bug 37363: linked items fails in Organization window
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 22 Nov 2017 16:15:31 +0100
changeset 33037 e90aea5051f2
parent 33036 747998ff0bb6
child 33038 4878d550b906
fixed bug 37363: linked items fails in Organization window

All virtual entities generated for lazy initialization of computed columns include
client/org properties, causing linked items to fail as they were handled as standard
windows.

They are now excluded.
src/org/openbravo/erpCommon/utility/UsedByLink.java
--- a/src/org/openbravo/erpCommon/utility/UsedByLink.java	Tue Nov 21 17:58:52 2017 +0100
+++ b/src/org/openbravo/erpCommon/utility/UsedByLink.java	Wed Nov 22 16:15:31 2017 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2016 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -685,7 +685,7 @@
           if (!property.isOneToMany() && property.getColumnName() != null
               && property.getTargetEntity() != null
               && property.getTargetEntity().getTableName().equalsIgnoreCase(tableName)
-              && !property.isComputedColumn()) {
+              && !property.isComputedColumn() && !property.getEntity().isVirtualEntity()) {
             // Datasource tables are skipped
             linkedTableId = property.getEntity().getTableId();
             linkedTableObject = OBDal.getInstance().get(Table.class, linkedTableId);