示例#1
0
        public List <SunAccount> GetSunAccounts()
        {
            OdooCredentials   creds           = new OdooCredentials();
            OdooApi           api             = new OdooApi(creds, serverCertificateValidation: false);
            OdooModel         sunAccountModel = api.GetModel <SunAccount>();
            List <SunAccount> sunAccounts     = new List <SunAccount>();

            List <OdooRecord> records = sunAccountModel.SearchAll();

            foreach (var record in records)
            {
                var account = record.GetEntity <SunAccount>();
                sunAccounts.Add(account);
            }

            return(sunAccounts);
        }
示例#2
0
 public OdooRecord(OdooApi api, string model, int id)
 {
     _model = model;
     _api   = api;
     Id     = id;
 }
示例#3
0
 public OdooModel(string modelName, OdooApi api)
 {
     _api       = api;
     _modelName = modelName;
 }