fixed bug 0009579: Cannot generate invoices through the pop-up window process. Strange message appears
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 22 Jun 2009 14:27:43 +0200
changeset 4054 2d7e6ef084b3
parent 4053 da6a63faba6a
child 4055 f15a06e10f8a
child 4238 512d09e49ae8
fixed bug 0009579: Cannot generate invoices through the pop-up window process. Strange message appears
src-wad/src/org/openbravo/wad/WadActionButton.java
--- a/src-wad/src/org/openbravo/wad/WadActionButton.java	Mon Jun 22 17:32:13 2009 +0530
+++ b/src-wad/src/org/openbravo/wad/WadActionButton.java	Mon Jun 22 14:27:43 2009 +0200
@@ -932,8 +932,16 @@
 
       script.append("\nfunction reloadComboReloads").append(fd.reference).append(
           "(changedField) {\n");
+      script.append("  var action;\n");
+      script.append("  if (document.forms[0]) {\n");
+      script.append("    action = document.forms[0].action;\n");
+      script.append("  }\n");
+
       script
           .append("  submitCommandForm(changedField, false, null, '../ad_callouts/ComboReloadsProcessHelper.html', 'hiddenFrame', null, null, true);\n");
+      script.append("  if (document.forms[0]) {\n");
+      script.append("    document.forms[0].action = action;\n");
+      script.append("  }\n");
       script.append("  return true;\n");
       script.append("}\n");