diff -r e905f809d409 src/org/openbravo/dal/service/OBCriteria.java
--- a/src/org/openbravo/dal/service/OBCriteria.java	Fri Aug 12 17:54:08 2016 +0200
+++ b/src/org/openbravo/dal/service/OBCriteria.java	Tue Aug 23 14:43:54 2016 +0200
@@ -70,6 +70,31 @@
   private List<OrderBy> orderBys = new ArrayList<OrderBy>();
   private boolean initialized = false;
 
+  private boolean didSearch = false;
+
+  private void checkDoubleSearch() {
+    if (didSearch) {
+      // recheck if not internal call (i.e. OBCriteria -> CriteriaImpl -> OBCriteria again
+      Throwable t = new Throwable();
+      for (StackTraceElement ste : t.getStackTrace()) {
+        // OBcrit.uniqueResult -> CritImpl.uniqueResult -> OBcrit.list
+        if (ste.getClassName().equals("org.hibernate.impl.CriteriaImpl")
+            && ste.getMethodName().equals("uniqueResult")) {
+          return;
+        }
+        // OBCrit.count -> OBcrit.uniqueResult
+        if (ste.getClassName().equals("org.openbravo.dal.service.OBCriteria")
+            && ste.getMethodName().equals("count")) {
+          return;
+        }
+      }
+      // some search called twice -> report it
+      log.warn("Extra search done on OBQuery instance: ", new Throwable());
+    } else {
+      didSearch = true;
+    }
+  }
+
   // package visible
 
   public OBCriteria(String entityOrClassName) {
@@ -87,6 +112,7 @@
    */
   @SuppressWarnings("unchecked")
   public List<E> list() throws HibernateException {
+    checkDoubleSearch();
     initialize();
     return super.list();
   }
@@ -98,6 +124,7 @@
    * @return the count of the objects using the filter set in this Criteria
    */
   public int count() {
+    checkDoubleSearch();
     initialize();
     setProjection(Projections.rowCount());
     /*
@@ -116,6 +143,7 @@
    * See the scroll method on the Hibernate Criteria class.
    */
   public ScrollableResults scroll() throws HibernateException {
+    checkDoubleSearch();
     initialize();
     return super.scroll();
   }
@@ -124,6 +152,7 @@
    * See the scroll method on the Hibernate Criteria class.
    */
   public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException {
+    checkDoubleSearch();
     initialize();
     return super.scroll(scrollMode);
   }
@@ -132,6 +161,7 @@
    * See the uniqueResult() method on the Hibernate Criteria class.
    */
   public Object uniqueResult() throws HibernateException {
+    checkDoubleSearch();
     initialize();
     return super.uniqueResult();
   }
diff -r e905f809d409 src/org/openbravo/dal/service/OBQuery.java
--- a/src/org/openbravo/dal/service/OBQuery.java	Fri Aug 12 17:54:08 2016 +0200
+++ b/src/org/openbravo/dal/service/OBQuery.java	Tue Aug 23 14:43:54 2016 +0200
@@ -76,6 +76,17 @@
 
   private String selectClause;
 
+  private boolean didSearch = false;
+
+  private void checkDoubleSearch() {
+    if (didSearch) {
+      // some search called twice -> report it
+      log.warn("Extra search done on OBQuery instance: ", new Throwable());
+    } else {
+      didSearch = true;
+    }
+  }
+
   // package visible
   OBQuery() {
   }
@@ -91,6 +102,7 @@
    */
   @SuppressWarnings("unchecked")
   public E uniqueResult() {
+    checkDoubleSearch();
     return (E) createQuery().uniqueResult();
   }
 
@@ -104,6 +116,7 @@
    * @see OBQuery#uniqueResult() uniqueResult for a type-safe version
    */
   public Object uniqueResultObject() {
+    checkDoubleSearch();
     return createQuery().uniqueResult();
   }
 
@@ -115,6 +128,7 @@
    */
   @SuppressWarnings("unchecked")
   public List<E> list() {
+    checkDoubleSearch();
     return createQuery().list();
   }
 
@@ -127,6 +141,7 @@
    */
   @SuppressWarnings("unchecked")
   public Iterator<E> iterate() {
+    checkDoubleSearch();
     return createQuery().iterate();
   }
 
@@ -139,6 +154,7 @@
    *         scrollMode
    */
   public ScrollableResults scroll(ScrollMode scrollMode) {
+    checkDoubleSearch();
     return createQuery().scroll(scrollMode);
   }
 
@@ -148,6 +164,7 @@
    * @return the number of objects in the database taking into account the where and orderby clause
    */
   public int count() {
+    checkDoubleSearch();
     // add a space because the FROM constant also starts with a space
     String qryStr = " " + stripOrderBy(createQueryString());
     if (qryStr.toLowerCase().contains(FROM_SPACED)) {
@@ -169,6 +186,7 @@
    * @return the row number or -1 if not found
    */
   public int getRowNumber(String targetId) {
+    checkDoubleSearch();
     String qryStr = createQueryString();
     if (qryStr.toLowerCase().contains(FROM_SPACED)) {
       final int index = qryStr.indexOf(FROM_SPACED) + FROM_SPACED.length();
