diff -r 9780a5222687 src-test/src/org/openbravo/test/datasource/ExtendedNavigationModelTest.java
--- a/src-test/src/org/openbravo/test/datasource/ExtendedNavigationModelTest.java	Fri Feb 05 12:02:24 2016 +0100
+++ b/src-test/src/org/openbravo/test/datasource/ExtendedNavigationModelTest.java	Fri Feb 12 12:43:07 2016 +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) 2015 Openbravo SLU 
+ * All portions are Copyright (C) 2015-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -73,6 +73,8 @@
   // Return from customer window
   private static String returnFromCustomerWindow = "FF808081330213E60133021822E40007";
 
+  private static final String PAYMENT_IN_WINDOW = "E547CE89D4C04429B6340FFA44E70716";
+
   /**
    * Tests the link to the lines tab of the sales order window
    */
@@ -122,4 +124,25 @@
     assertThat("The destination window is not the return from customer window",
         responseJson2.getString("windowId"), equalTo(returnFromCustomerWindow));
   }
+
+  /** testing issue #32218 */
+  @Test
+  public void paymentInLinesToOrderNavigation() throws Exception {
+    changeProfile(ROLE_ID, LANGUAGE_ID, ORGANIZATION_ID, WAREHOUSE1_ID);
+
+    Map<String, String> params2 = new HashMap<String, String>();
+    params2.put("Command", "JSON");
+    params2.put("inpEntityName", "FIN_Payment_Schedule"); // TODO: this might change after fix
+    params2.put("inpKeyReferenceId", "xx");
+    params2.put("inpwindowId", PAYMENT_IN_WINDOW);
+    params2.put("inpKeyReferenceColumnName", "Fin_Payment_Schedule_ID");
+
+    JSONObject response = new JSONObject(doRequest("/utility/ReferencedLink.html", params2, 200,
+        "POST"));
+
+    assertThat("The destination tab is not the lines tab of the sales order window",
+        response.getString("tabId"), equalTo(salesOrderLinesTab));
+    assertThat("The destination window is not the sales order window",
+        response.getString("windowId"), equalTo(salesOrderWindow));
+  }
 }
