public ResultSet GetEntityCommand(OdooCommandContext commandContext, IEnumerable <object> ids) { _context.UserId = Login(); try { var resultset = _context.OdooData.Read(_context.Database, _context.UserId, _context.Password, commandContext.EntityName, "read", ids.ToArray(), commandContext.GetArguments()); return(new ResultSet(resultset)); } catch (XmlRpcFaultException e) { throw OdooException.GetException(e); } }
private IEnumerable <object> SearchCommand(OdooCommandContext commandContext) { _context.UserId = Login(); try { if (commandContext.Limit != 0) { return(_context.OdooData.Search(_context.Database, _context.UserId, _context.Password, commandContext.EntityName, "search", commandContext.GetArguments(), commandContext.Offset, commandContext.Limit, commandContext.Order)); } return(_context.OdooData.Search(_context.Database, _context.UserId, _context.Password, commandContext.EntityName, "search", commandContext.GetArguments())); } catch (XmlRpcFaultException e) { throw OdooException.GetException(e); } }