res.users integrity error message

Topics: OpenErpNet Connector
Dec 22, 2014 at 10:16 PM
HI,
i have a integrity message when adding a res.users records
this the error message:
  InnerException: CookComputing.XmlRpc.XmlRpcFaultException
       HResult=-2146232832
       Message=Server returned a fault exception: [1] warning -- Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: name - name]
       Source=CookComputing.XmlRpcV2
       FaultCode=1
       FaultString=warning -- Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: name - name]
       StackTrace:
            à CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(XmlDocument xdoc, Type returnType)
            à CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType)
            à CookComputing.XmlRpc.XmlRpcClientProtocol.ReadResponse(XmlRpcRequest req, WebResponse webResp, Stream respStm, Type returnType)
            à CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters)
            à CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi, Object[] Parameters)
            à XmlRpcProxy6f75ccf0-720c-4b9e-89fb-546f49e4b5f2.create(String dbName, Int32 userId, String pwd, String model, String method, XmlRpcStruct fieldValues)
            à Jlob.OpenErpNet.OpenErpService.AddCommand(CommandContext context)
       InnerException: 
my code :
            OpenErpService openErpService = new OpenErpService("http://127.0.0.1:8069", "portail", "admin", "aaaa");
            Users users = new Users();
            users.active = true;
            users.login = "6367";
           // users.password = "''";
            users.company_id = 1;
            users.parter_id =  3;// 3 existe on the res.partner
            users.password_crypt = "$pbkdf2-sha512$19000$g5Ay5nwPYUxJCaFUCsEYYw$fXWo76qknQVB.GmGRwpslHdH7BkkNnyYUQJC6wCD6zTR2lAcG1D/YVbmhWtfZuKPwfKmKOwocgn6/cUuYl/PhQ";
            users.user_type = "st"; // modication on user object type string
              users.alias_id = 1;
            users.display_groups_suggestions = true;
            users.share = false;
            openErpService.AddEntity<Users>(users);

        }
this my maping part
//res.users
    [OpenErpMap("res.users")]
        public class Users
    {
         [OpenErpMap("id")]
         public int id
         {
             get;
             set;
         }

         [OpenErpMap("active")]
         public bool active
         {
             get;
             set;
         }

         [OpenErpMap("login")]
         public string login
         {
             get;
             set;
         }

         [OpenErpMap("password")]
         public string password
         {
             get;
             set;
         }

         [OpenErpMap("company_id")]
         public int company_id
         {
             get;
             set;
         }
         
         [OpenErpMap("parter_id")]
         public int parter_id
         {
             get;
             set;
         }
         
         [OpenErpMap("password_crypt")]
         public string password_crypt
         {
             get;
             set;
         }

         [OpenErpMap("user_type")]
         public string user_type
         {
             get;
             set;
         }

         [OpenErpMap("alias_id")]
         public int alias_id
         {
             get;
             set;
         }

         [OpenErpMap("eleve")]
         public int eleve
         {
             get;
             set;
         }

         [OpenErpMap("display_groups_suggestions")]
         public bool display_groups_suggestions
         {
             get;
             set;
         }

         [OpenErpMap("share")]
         public bool share
         {
             get;
             set;
         }

        public Users()
        {
        }

    }
thanks for any help