Fixes issue 0029132: Internal cosumption line can not be saved,
authorJon Alegría <jon.alegria@openbravo.com>
Wed, 04 Mar 2015 18:06:07 +0100
changeset 26122 bce56d638278
parent 26121 b8ecd42c2db7
child 26123 f06d7018a52b
Fixes issue 0029132: Internal cosumption line can not be saved,
because unit is not filled when attribute set in product setup
is empty
src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Product.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Product.java	Wed Mar 04 14:50:57 2015 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Product.java	Wed Mar 04 18:06:07 2015 +0100
@@ -112,10 +112,12 @@
     } finally {
       OBContext.restorePreviousMode();
     }
-    resultado.append("new Array(\"inpattributeset\", \"" + FormatUtilities.replaceJS(strAttrSet)
+    resultado.append("new Array(\"inpattributeset\", \"" 
+        + (strAttrSet == null || strAttrSet.equals("") ? "" : FormatUtilities.replaceJS(strAttrSet))
         + "\"),\n");
     resultado.append("new Array(\"inpattrsetvaluetype\", \""
-        + FormatUtilities.replaceJS(strAttrSetValueType) + "\"),\n");
+        + (strAttrSetValueType == null || strAttrSetValueType.equals("") ? "" : FormatUtilities.replaceJS(strAttrSetValueType))
+    	+ "\"),\n");
     resultado.append("new Array(\"inpmovementqty\", " + (strQty.equals("") ? "\"\"" : strQty)
         + "),\n");
     resultado.append("new Array(\"inpquantityorder\", " + (strPQty.equals("") ? "\"\"" : strPQty)