fixed bug 25115: cannot update characteristics depending on its name
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 27 Jan 2014 16:03:14 +0100
changeset 21876 9b47b9cdf8c1
parent 21875 496cbeb8f989
child 21877 dd222399853e
fixed bug 25115: cannot update characteristics depending on its name

SC client doesn't support field names with / character
modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java
web/js/productCharacteristicsProcess.js
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Mon Jan 27 15:32:04 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Mon Jan 27 16:03:14 2014 +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) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -101,7 +101,8 @@
             productChar.put("selectedValue", selectedValue.getCharacteristicValue().getId());
             productChar.put("existingProdChValue", selectedValue.getId());
           }
-          productChar.put("name", characteristic.getCharacteristic().getName());
+          productChar.put("title", characteristic.getCharacteristic().getName());
+          productChar.put("name", characteristic.getCharacteristic().getName().replace("/", "__"));
 
           // Retrieves all the possible values for the characteristic
           List<CharacteristicValue> values = characteristic.getCharacteristic()
--- a/web/js/productCharacteristicsProcess.js	Mon Jan 27 15:32:04 2014 +0100
+++ b/web/js/productCharacteristicsProcess.js	Mon Jan 27 16:03:14 2014 +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) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -84,7 +84,7 @@
         fields: [{
           id: this.characteristicList[i].id,
           name: this.characteristicList[i].name,
-          title: this.characteristicList[i].name,
+          title: this.characteristicList[i].title,
           valueMap: this.characteristicList[i].valueMap,
           defaultValue: this.characteristicList[i].selectedValue,
           existingProdChValue: this.characteristicList[i].existingProdChValue,