OdooWiki OCA HUB
Uncategorised License: LGPL-3

Provide helpers to authorize RPC calls.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

This module lets administrators block external RPC (remote) calls to specific Odoo models or methods, or to all methods of a model. It adds a configuration field on each model's form to list the methods to disable.

This module gives administrators control over which models and methods can be called remotely through Odoo's RPC interface (for example, from external programs using XML-RPC or JSON-RPC).

On the form of each model (in the technical model list), a new "RPC config" page appears for users with technical settings access. There, a JSON text field lets you list the methods to block. For example, entering {'disable': ['search', 'do_this']} blocks those two methods, while {'disable': ['all']} blocks every method of that model.

When an external call tries to use a blocked method, Odoo raises an error saying the RPC call is not allowed. The configuration is cached and refreshed automatically when the field is changed.

Developers can also mark a model class directly in code to disable RPC calls, either for all methods or for specific ones. The module patches Odoo's RPC handler to enforce these rules. It depends on the base_sparse_field module and adds a field to the ir.model model.

Depends on

base_sparse_field

Required by other modules

Models and fields (1)
  • ir.model · extends an existing modelrpc_config_edit

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 6 confirmed, 3 with no information of 9 versions.

Sources · Odoo 17.0

Confirmed on 2026-11-03 in branch 17.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 19.0

Enable debug mode and go to "Technical -\> Database Structure -\> Models".

Open the model that you like to configure and go to the tab "RPC config".

There you see a text field which supports JSON configuration.

The configuration is the same you can pass via decorator. The only difference is that you have to wrap values in a dictionary like {"disable": [...values...]}.

To disable all calls:

{ "disable": ["all"] }

To disable only some methods:

{ "disable": ["create", "write", "another_method"] }

NOTE: on the resulting JSON will be automatically formatted on save for better readability.

Via code

Decorate an Odoo model class like this:

from odoo.addons.rpc_helper.decorator import disable_rpc

@disable_rpc() class AverageModel(models.Model): _inherit = "avg.model"

This will disable ALL calls.

To selectively disable only some methods:

@disable_rpc("create", "write", "any_method") class AverageModel(models.Model): _inherit = "avg.model"

Via ir.model configuration

See "Configuration" section.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.