Skip to content

[20.0][MIG] fastapi: Migration to 20.0 - #652

Open
DMopen2s wants to merge 8 commits into
OCA:20.0from
DMopen2s:20.0-mig-fastapi
Open

DMopen2s wants to merge 8 commits into
OCA:20.0from
DMopen2s:20.0-mig-fastapi

Conversation

@DMopen2s

@DMopen2s DMopen2s commented Oct 12, 2026 •

Copy link
Copy Markdown

Migration of to Odoo 20.0.

Blocked by: OCA/web-api#177

@oca-cla-bot

oca-cla-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@DMopen2s DMopen2s changed the title 20.0 mig fastapi [20.0][MIG] fastapi: Migration to 20.0 Oct 12, 2026
@DMopen2s
DMopen2s changed the base branch from 19.0 to 20.0 October 12, 2026 03:16
@DMopen2s
DMopen2s force-pushed the 20.0-mig-fastapi branch 2 times, most recently from 2516994 to 709c1d8 Compare October 12, 2026 03:50

@ntsirintanis ntsirintanis left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread fastapi/__manifest__.py Outdated
"version": "20.0.1.1.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"author": "ACSONE SA/NV, Open2S, Odoo Community Association (OCA)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For just migrating you can't add yourself as an author, for that, CONTRIBUTING file is good enough

Comment thread fastapi/__manifest__.py Outdated
Odoo FastAPI endpoint""",
"version": "19.0.1.1.0",
"summary": "Odoo FastAPI endpoint",
"version": "20.0.1.1.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 20.0.1.0.0

@OpenSourceSolutions-open2s

Copy link
Copy Markdown

Hi @thomaspaulb, @lmignon,
The PR has been completely rebased and updated following the OCA migration guidelines and review feedback:

  1. Author & Contributors (@thomaspaulb):
    • Reverted "author" in fastapi/__manifest__.py back to "ACSONE SA/NV, Odoo Community Association (OCA)".
    • Migration credits are kept in fastapi/readme/CONTRIBUTORS.md.
  2. Version Format (@thomaspaulb):
    • Reset version in __manifest__.py to 20.0.1.0.0.
  3. Commit History & Structure:
    • Preserved full git history from 19.0 using git format-patch / git am -3 --keep.
    • Migration commit named cleanly without version tag: [MIG] fastapi: Migration to 20.0.
  4. Code Quality & Testing:
    • Updated deprecated @tools.ormcache to @api.ormcache for Odoo 20 compatibility.
    • All pre-commit hooks pass green locally.
    • Module tests verified locally against Odoo 20: 25 post-tests passing (0 failed, 0 errors).
      Note regarding CI: fastapi depends on endpoint_route_handler from OCA/web-api. The migration PR for endpoint_route_handler is currently pending merge in [20.0][MIG] endpoint_route_handler: Migration to 20.0 web-api#177 (with all tests green). Once that PR is merged into web-api 20.0, the dependency installation in this CI will automatically succeed.
      Could you please review when you have a chance? Thank you!

@lmignon lmignon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • pre-commit is 🔴 (unused import into one module)
  • pending changes required by dependencies must be specified into the test-requirement.txt file and commited into a specfic commit with "[DO NOT MERGE] ... the reason ...." as comment. To reference the PR for endpoint PR the line should look like odoo-addon-endpoint-route-handler @ git+https://github.com/OCA/web-api@refs/pull/177/head#subdirectory=endpoint_route_handler
  • comment into the code

Comment thread fastapi/patch.py
Comment on lines -31 to +40
Request._get_session_and_dbname = _patched_get_session_and_dbname
def _patched_set_session_and_dbname(request):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you preserve the method _patched_get_session_and_dbnameat line 20?

@lmignon

lmignon commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hi @thomaspaulb, @lmignon, The PR has been completely rebased and updated following the OCA migration guidelines and review feedback:

1. **Author & Contributors (@thomaspaulb):**
   
   * Reverted `"author"` in `fastapi/__manifest__.py` back to `"ACSONE SA/NV, Odoo Community Association (OCA)"`.
   * Migration credits are kept in `fastapi/readme/CONTRIBUTORS.md`.

2. **Version Format (@thomaspaulb):**
   
   * Reset version in `__manifest__.py` to `20.0.1.0.0`.

3. **Commit History & Structure:**
   
   * Preserved full git history from `19.0` using `git format-patch` / `git am -3 --keep`.
   * Migration commit named cleanly without version tag: `[MIG] fastapi: Migration to 20.0`.

4. **Code Quality & Testing:**
   
   * Updated deprecated `@tools.ormcache` to `@api.ormcache` for Odoo 20 compatibility.
   * All `pre-commit` hooks pass green locally.
   * Module tests verified locally against Odoo 20: 25 post-tests passing (0 failed, 0 errors).
     _Note regarding CI_: `fastapi` depends on `endpoint_route_handler` from `OCA/web-api`. The migration PR for `endpoint_route_handler` is currently pending merge in [[20.0][MIG] endpoint_route_handler: Migration to 20.0 web-api#177](https://github.com/OCA/web-api/pull/177) (with all tests green). Once that PR is merged into `web-api` 20.0, the dependency installation in this CI will automatically succeed.
     Could you please review when you have a chance? Thank you!

Comments from IA are not welcome and useless....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants