Beispiel #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);
        }
Beispiel #2
0
 public OdooRecord(OdooApi api, string model, int id)
 {
     _model = model;
     _api   = api;
     Id     = id;
 }
Beispiel #3
0
 public OdooModel(string modelName, OdooApi api)
 {
     _api       = api;
     _modelName = modelName;
 }