Odoo 1.0.0
dotnet add package Odoo --version 1.0.0
NuGet\Install-Package Odoo -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Odoo" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Odoo --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Odoo, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Odoo as a Cake Addin #addin nuget:?package=Odoo&version=1.0.0 // Install Odoo as a Cake Tool #tool nuget:?package=Odoo&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PROGRESS TRACKER
API
- Api Read
- Api Create
- Api Update
- Api Delete
- Api Action
- Api Count
- Api Group
Metadata
- Api Version
Transaction
- Error Handler
HOW TO USE
Example
using Odoo;
public class Test
{
static void Main(string[] args)
{
JsonRPC.Configure(new Credential
{
userid = 0, // user id from odoo menu `user & companies`
username = "" // user name from odoo menu `user & companies`,
password = "" // api key from odoo,
database = "" // database name,
uri = "" // odoo url (include the port for ex: 443)
});
TestRead();
}
static void TestRead()
{
// limit data
int limit = 7;
// column te be fetch, good to used to reduce volume datas
string[] fields = new string[] { "id", "name", "type" };
// filter data (for ex: filter product by active = true)
object[] filters = new object[]
{
new object[] {"active", "=", true},
};
var result = JsonRPC.Read("product.product", filters, fields, limit);
Console.WriteLine(result);
}
}
Example CRUD
CREATE
static void Create()
{
// column to insert
Object[] vals = new Object[] {
new {
name = "Product Sharp 01",
type = "product",
},
new {
name = "Product Sharp 02",
type = "product",
},
};
var result = JsonRPC.Create("product.product", vals);
Console.WriteLine(result);
}
READ
static void Read()
{
// limit data
int limit = 7;
// column te be fetch, good to used to reduce volume datas
string[] fields = new string[] { "id", "name", "type" };
// filter data (for ex: filter product by active = true)
object[] filters = new object[]
{
new object[] {"active", "=", true},
};
var result = JsonRPC.Read("product.product", filters, fields, limit);
Console.WriteLine(result);
}
UPDATE
static void Update()
{
// record id
int recordId = {{put id record here}};
int[] recordIds = new int[] { recordId };
// column to insert
Object val = new {
name = "Product Sharp (UPDATE1)",
type = "product",
};
var result = JsonRPC.Update("product.product", recordIds, val);
Console.WriteLine(result);
}
DELETE
static void Delete()
{
// record id
int recordId = {{put id record here}};
int[] recordIds = new int[] { recordId };
var result = JsonRPC.Delete("product.product", recordIds);
Console.WriteLine(result);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Flurl (>= 4.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RestSharp (>= 112.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 92 | 9/4/2024 |