Skip to content

Commit

Permalink
[FIX] manyToOne: Not able to update record on server if many to one c…
Browse files Browse the repository at this point in the history
…olumn has null value.

Issue fixed: #82
  • Loading branch information
dpr-odoo committed Dec 21, 2016
1 parent 154c07d commit f9cf3ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/main/java/com/odoo/core/utils/OdooRecordUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
import com.odoo.core.orm.ODataRow;
import com.odoo.core.orm.OModel;
import com.odoo.core.orm.fields.OColumn;
import com.odoo.core.rpc.helper.ORecordValues;
import com.odoo.core.rpc.helper.utils.gson.OdooRecord;

import org.json.JSONArray;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.odoo.core.rpc.helper.ORecordValues;
import com.odoo.core.rpc.helper.utils.gson.OdooRecord;


public class OdooRecordUtils {
public static <T> List<T> toList(JSONArray array) {
Expand Down Expand Up @@ -100,6 +99,8 @@ public static ORecordValues createRecordValues(OModel model, ODataRow row) {
if (m2o != null) {
values.put(col.getSyncColumn(), m2o.getInt("id"));
}
} else {
values.put(col.getSyncColumn(), false);
}
break;
case OneToMany:
Expand Down

0 comments on commit f9cf3ad

Please sign in to comment.