Skip to content

[19.0][MIG] rpc_helper - #3539

Closed
JasminSForgeFlow wants to merge 27 commits into
OCA:19.0from
ForgeFlow:19.0-mig-rpc_helper
Closed

[19.0][MIG] rpc_helper#3539
JasminSForgeFlow wants to merge 27 commits into
OCA:19.0from
ForgeFlow:19.0-mig-rpc_helper

Conversation

@JasminSForgeFlow

Copy link
Copy Markdown
Contributor

Standard Migration

@ForgeFlow

simahawk and others added 27 commits March 5, 2026 07:05
Currently translated at 100.0% (16 of 16 strings)

Translation: server-tools-14.0/server-tools-14.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-rpc_helper/es_AR/
Currently translated at 100.0% (8 of 8 strings)

Translation: server-tools-16.0/server-tools-16.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-rpc_helper/es/

Added translation using Weblate (Spanish)
Currently translated at 100.0% (8 of 8 strings)

Translation: server-tools-16.0/server-tools-16.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-rpc_helper/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-16.0/server-tools-16.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-rpc_helper/
Currently translated at 100.0% (17 of 17 strings)

Translation: server-tools-16.0/server-tools-16.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-rpc_helper/es_AR/
Currently translated at 100.0% (17 of 17 strings)

Translation: server-tools-16.0/server-tools-16.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-rpc_helper/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-18.0/server-tools-18.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-rpc_helper/
Fixes
```
INFO odoo odoo.addons.rpc_helper.tests.test_xmlrpc: Starting TestXMLRPC.test_xmlrpc_can_search_create_blocked__ir_model ...
INFO odoo werkzeug: 127.0.0.1 - - [04/Feb/2025 13:39:13] "POST /xmlrpc/2/object HTTP/1.1" 200 - 22 0.006 0.437
WARNING odoo odoo.http: RPC call on res.partner is not allowed
```

New logging is due to odoo/odoo@a65b1d8
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-18.0/server-tools-18.0-rpc_helper
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-rpc_helper/

@AaronHForgeFlow AaronHForgeFlow 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.

Functional tests LGTM

The error is because rpc will be deprecated in 20.0

@JordiMForgeFlow

Copy link
Copy Markdown

rpc_helper module ends up patching the base method execute_cr which keeps being used regardless of the RPC deprecation.

To fix the tests I think we should simply use the new API instead of the deprecated XMLRPC in the test cases. @JasminSForgeFlow could you check?

@ivantodorovich

Copy link
Copy Markdown
Contributor

Odoo has a new @private decorator: odoo/odoo#195402
It works at the method-level, instead of the model-level like this one.

Still.. Do we still need this module?

@simahawk WDYT?

@simahawk

simahawk commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

It would be nice to refactor this module to apply the api.private decorator to all the impacted methods (basically setting the _api_private flag on the methods' object).

class IrModel(models.Model):
_inherit = "ir.model"

rpc_config = Serialized(compute="_compute_rpc_config", default={})

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.

I think we can drop base_sparse_field dependency:

Suggested change
rpc_config = Serialized(compute="_compute_rpc_config", default={})
rpc_config = fields.Json((compute="_compute_rpc_config", default={})

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.

@JasminSForgeFlow can you check this?

@AaronHForgeFlow

Copy link
Copy Markdown
Contributor

@simahawk

Copy link
Copy Markdown
Contributor

It seems RPC will be active more versions: linkedin.com/posts/odoodevelopers_odoo-odoodevelopment-erp-activity-7438620246724362241-SJGw

Then they might change the implementation of @api.private -> I'd leave this module as it is for now :)

Funny thing: tests are failing for the deprecation warning

image

@ivantodorovich

Copy link
Copy Markdown
Contributor

In order to merge this, we must solve the CI issue.
It seems it's only failing due to the deprecation warnings:

errors that caused failure (9):
2026-03-05 08:40:02,757 319 WARNING odoo odoo.addons.rpc.controllers.xmlrpc: The /xmlrpc, /xmlrpc/2 and /jsonrpc endpoints are deprecated in Odoo 19 and scheduled for removal in Odoo 20. Please report the problem to the client making the request.

It should probably be solved with a check-odoolog configuration, to ignore these warnings

@JasminSForgeFlow

@yankinmax

Copy link
Copy Markdown
Contributor

Hello @JasminSForgeFlow, will you be able to update and fix this PR soon or I can replace it with another one and speed up the migration process?

@yankinmax

yankinmax commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Hello @JasminSForgeFlow if you don't mind I've opened another PR which preserves your work:

Can you pls close this one?

@simahawk simahawk closed this Apr 28, 2026
@AaronHForgeFlow
AaronHForgeFlow deleted the 19.0-mig-rpc_helper branch July 24, 2026 15:03
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.