Allow organization change through json
authorMartin Taal <martin.taal@openbravo.com>
Wed, 12 Jan 2011 19:18:06 +0100
changeset 9744 77daf15b7209
parent 9743 4da47a14376b
child 9745 e87bcc4cd174
Allow organization change through json
modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java	Wed Jan 12 19:12:10 2011 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java	Wed Jan 12 19:18:06 2011 +0100
@@ -574,9 +574,9 @@
   protected boolean isNotConvertable(BaseOBObject obObject, Property property) {
     // one-to-many are never json-ized
     boolean doNotHandleThisProperty = property.isOneToMany();
-    // do not change auditinfo or client/org for an existing object
+    // do not change auditinfo or client for an existing object
     doNotHandleThisProperty |= !obObject.isNewOBObject()
-        && (property.isAuditInfo() || property.isClientOrOrganization());
+        && (property.isAuditInfo() || property.getName().equals(Organization.PROPERTY_CLIENT));
     // do not change not changeable properties
     doNotHandleThisProperty |= property.isInactive();
     // do not change not updatable properties