Support the new odoo 18.4 /json/2/ route#5
Merged
nseinlet merged 3 commits intoodoo:masterfrom Aug 28, 2025
Merged
Conversation
197350f to
4159c0c
Compare
2961b78 to
72965c5
Compare
72965c5 to
97b98aa
Compare
tfr-odoo
reviewed
Jul 24, 2025
97b98aa to
7295069
Compare
KangOl
reviewed
Jul 29, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the new JSON/2 route introduced in Odoo 18.4, providing a modern JSON-based API endpoint that uses bearer token authentication instead of username/password. The implementation includes support for both HTTP and HTTPS variants of the JSON/2 protocol.
Key changes:
- Added JSON/2 protocol support with new connectors and connection classes
- Implemented bearer token authentication for JSON/2 endpoints
- Added automatic method introspection for converting positional to named parameters
- Updated test infrastructure to support JSON/2 testing with API keys
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
odoolib/json2.py |
New module implementing JSON/2 specific connectors, connections, and model classes with bearer authentication |
odoolib/rpc.py |
Refactored RPC classes from main.py into dedicated module for better organization |
odoolib/tools.py |
Extracted common utilities and base classes for reuse across different protocols |
odoolib/main.py |
Updated to import from new modules and added JSON/2 protocol support to connection factory methods |
test.py |
Added JSON/2 to test protocols and implemented environment-based API key authentication |
setup.py |
Version bump to 2.0.0 reflecting the major new feature addition |
README.rst |
Updated documentation to explain JSON/2 protocol, SSL support, and compatibility matrix |
KangOl
reviewed
Jul 29, 2025
KangOl
reviewed
Jul 29, 2025
KangOl
reviewed
Jul 29, 2025
ea08371 to
42ef8a6
Compare
bosd
pushed a commit
to OdooDataFlow/odoo-data-flow
that referenced
this pull request
Aug 7, 2025
The `context` dictionary was not being correctly passed during RPC calls to the Odoo server. This prevented disabling server-side features, such as the VIES VAT check, leading to errors and performance issues. The upstream `odoo-client-lib` has a fix for this in a pending pull request which correctly uses the `execute_kw` RPC method. This commit updates the dependency in `pyproject.toml` to point directly to the head of the pull request to unblock development until the fix is officially merged and released on PyPI. See: odoo/odoo-client-lib#5
|
Thanks for this PR 👍 ✨ |
Odoo 19.0 comes with a new `json/2/` endpoint. this commit makes the library compatible with this new endpoint.
From setup.py to pyproject.toml Added a licence.txt file and removed licence notice in source files.
42ef8a6 to
7374891
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.