# HG changeset patch
# User Naroa Iriarte <naroa.iriarte@openbravo.com>
# Date 1467112954 -7200
#      Tue Jun 28 13:22:34 2016 +0200
# Node ID 84123b54fddf1a39e3287b719af355e838064da4
# Parent  c01922c14219237f6b04696df536de09ce9af86a
Fixed issue 32495: The "Create Lines From" process is fixed.

The "Create Lines From" process was creating multiple product lines when the
OK button was pressed several times. This could be reproducuble in environments
with slow internet connections in those environments the OK button could be clicked
a lot of times. This was not correct, the OK button should be disabled after pressing
it the first time.
The "submitThisPage" function of the "CreateFrom_Invoice.html" has been changed. Now,
in this function the buttons clicked are disabled and thanks to this, the OK button is
unable to be clicked again after the first time.

diff --git a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice.html b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice.html
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice.html
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice.html
@@ -36,6 +36,7 @@
   <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
   <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
   <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
+  <script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
   <script type="text/javascript">
     window.onunload = reloadOpener; // reloads opener on closing
   </script>
@@ -53,6 +54,8 @@
               inp[i].removeAttribute("disabled");
           }
         submitCommandForm(strCommand, false, null, null);
+        disableButton('buttonOK');
+        disableButton('buttonCancel');
         return true;
       }
       return true;
