CreateIf.OdooSharp.Codegen
0.0.15
dotnet add package CreateIf.OdooSharp.Codegen --version 0.0.15
NuGet\Install-Package CreateIf.OdooSharp.Codegen -Version 0.0.15
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="CreateIf.OdooSharp.Codegen" Version="0.0.15" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CreateIf.OdooSharp.Codegen" Version="0.0.15" />
<PackageReference Include="CreateIf.OdooSharp.Codegen" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CreateIf.OdooSharp.Codegen --version 0.0.15
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CreateIf.OdooSharp.Codegen, 0.0.15"
#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.
#addin nuget:?package=CreateIf.OdooSharp.Codegen&version=0.0.15
#tool nuget:?package=CreateIf.OdooSharp.Codegen&version=0.0.15
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
๐งฉ OdooGen โ Odoo Model Code Generator for .NET
OdooGen is a .NET CLI & PowerShell tool that helps you generate strongly-typed C# model classes from Odoo metadata via the RPC API.
Use it in microservices or backend integrations โ works perfectly with Odoo SaaS (Cloud) and On-Premise environments.
โจ Features
- ๐ Generate classes for one or all Odoo models
- โ Nullable and typed properties
- โก Works without Python modules or Odoo addons
- ๐งช PowerShell integration for Visual Studio
- ๐งฐ Supports
.env
-based configuration - ๐งฑ Designed for clean CI/CD usage (e.g. GitHub Actions)
๐ฆ Installation
๐น Option 1 โ .NET Global Tool
dotnet tool install --global CreateIf.OdooSharp.Codegen
Make sure ~/.dotnet/tools is in your PATH.
๐น Option 2 โ NuGet Package (Visual Studio + PowerShell) (preferred)
Install-Package CreateIf.OdooSharp.Codegen
Registers OdooGen-* commands in Package Manager Console.
โ๏ธ Quickstart
1. Initialize config
OdooGen-Init
Creates a .env file with:
ODOO_CLIENT_URL=https://your.odoo.server
ODOO_CLIENT_DB=your-database
ODOO_CLIENT_USERNAME=your-email@example.com
ODOO_CLIENT_PASSWORD=your-password
๐ง PowerShell Commands (PMC)
Command | Description |
---|---|
OdooGen-Init |
Creates .env configuration file |
OdooGen-Check |
Tests Odoo server & authentication |
OdooGen-Generate |
Generates model class files |
OdooGen-Version |
Displays the installed version |
OdooGen-Help |
Shows CLI usage overview |
๐น Examples
# Initialize config
OdooGen-Init
# Check connection
OdooGen-Check
# Generate single model
OdooGen-Generate -Model res.partner
# Generate all models to a specific folder
OdooGen-Generate -All -Output ./Generated
๐ป CLI Usage (dotnet tool)
If installed via dotnet tool, you can use:
dotnet odoogen init
dotnet odoogen check
dotnet odoogen generate --model res.partner
dotnet odoogen generate --all --output ./Generated
dotnet odoogen --version
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- CreateIf.OdooSharp (>= 0.0.15)
- DotNetEnv (>= 3.1.1)
- System.CommandLine (>= 2.0.0-beta4.22272.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.