public List <OdooRecord> SearchAndRead(object[] filter, int?offset = null, int?limit = null) { List <OdooRecord> records = new List <OdooRecord>(); //int[] ids = _api.Search(_modelName, filter, offset, limit); object[] result = _api.SearchAndRead(_modelName, filter, _fields.ToArray(), offset, limit); foreach (object entry in result) { XmlRpcStruct vals = (XmlRpcStruct)entry; // Get ID int id = (int)vals["id"]; OdooRecord record = new OdooRecord(_api, _modelName, id); // Get other values foreach (string field in _fields) { record.SetValue(field, vals[field]); } records.Add(record); } return(records); }
public void Remove(OdooRecord record) { Remove(new List <OdooRecord>() { record }); }
public void Save(OdooRecord record) { Save(new List <OdooRecord>() { record }); }