KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
OdooRpcWrapper
★ 27
Open GitHub ↗
C# interaction with Odoo
Download README (.md)
Explore Similar Repositories
eslint-plugin
:
ESLint configurations and additional rules for me
ZFSmond
:
Tiny ZFS Web Interface written in AngularJS and Flask Restful
stack-ide-sublime
:
An Sublime Text IDE for Haskell based on stack-ide
natflt
:
NDIS5/NDIS6 filter driver based simple firewall and static (1x1) NAT engine for Windows 7/8/10
tianchi_project
:
天池竞赛
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
OdooRpcWrapper
?
Download (.md)
# Odoo - C# API =============== This library contains basic code to interact with Odoo from a C# application. ## Examples Create credential object: > OdooConnectionCredentials creds = new OdooConnectionCredentials("https://your.instance", "database", "admin", "password"); Log in: > OdooAPI api = new OdooAPI(creds); ## Initialize model Define what model you want to use: > OdooModel productModel = api.GetModel("product.template"); Define what fields to fetch by default: > productModel.AddField("name"); > productModel.AddField("default_code"); ## Create Create new objects by calling the model. New objects need to be saved. > OdooRecord record = productModel.CreateNew(); > record.SetValue("name", "my new product!") > record.Save() ## Search > object[] filter = new object[1]; > filter[0] = new object[3] { "name", "my new product", "" }; > List<OdooRecord> records = productModel.Search(filter); > foreach(OdooRecord record in records) > { > Console.WriteLine(String.Format("[{0}] {1}", record.GetValue("default_code"), record.GetValue("name"))); > } ## Modify Modify C# objects, and call 'Save' > OdooRecord record = records[0] > record.SetValue("name", "my old product") > record.Save()