details:   https://code.openbravo.com/erp/devel/pi/rev/68ef470f54c0
changeset: 18171:68ef470f54c0
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Tue Oct 09 12:15:28 2012 +0200
summary:   Fixes issue 21857: In Physical Inventory 2nd UOM fields are not 
refreshed if they do not have any value

diffstat:

 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
 |  1 +
 src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java              
                              |  6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 5eec20fefc1c -r 68ef470f54c0 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
--- 
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Tue Oct 09 11:13:33 2012 +0200
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Tue Oct 09 12:15:28 2012 +0200
@@ -527,6 +527,7 @@
           if (record) {
             value = record[i];
             if (typeof value === 'undefined') {
+              form.hiddenInputs[this.outHiddenInputPrefix + 
outFields[i].suffix] = '';
               continue;
             }
             if (isc.isA.Number(value)) {
diff -r 5eec20fefc1c -r 68ef470f54c0 
src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java Tue Oct 
09 11:13:33 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java Tue Oct 
09 12:15:28 2012 +0200
@@ -36,7 +36,6 @@
   protected void execute(CalloutInfo info) throws ServletException {
 
     // Locator
-
     String strLocator = info.vars.getStringParameter("inpmProductId_LOC");
 
     if (strLocator.startsWith("\"")) {
@@ -127,7 +126,10 @@
       throw new ServletException(ex);
     }
 
-    if (tld != null && tld.length > 0) {
+    // Verify that the selected product from the warehouse has secondary unit
+    String strHasSecondaryUOMInInventory = 
info.vars.getStringParameter("inpmProductId_PUOM");
+
+    if (tld != null && tld.length > 0 && 
!"".equals(strHasSecondaryUOMInInventory)) {
       info.addSelect("inpmProductUomId");
       for (int i = 0; i < tld.length; i++) {
         info.addSelectResult(tld[i].getField("id"), tld[i].getField("name"), 
tld[i].getField("id")

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to