execute_odoo_code | Execute Python code in an Odoo shell environment with full access to Odoo models and environment.
This tool provides direct access to the Odoo ORM and all loaded modules through
the shell environment. The ``env`` variable is available for accessing models,
and all standard Odoo shell features are accessible.
:param code: Python code to execute in the Odoo context
:type code: str
:return: The output from executing the code
:rtype: str
.. note::
The shell maintains persistent state between calls, so variables
defined in one execution will be available in subsequent calls.
.. warning::
Code executed through this tool has full access to the Odoo database
and can modify data. Use with appropriate caution. |
reset_odoo_shell | Reset the Odoo shell session (restart the shell process).
Terminates the current shell process and clears the global shell manager,
which will cause a new shell to be started on the next code execution.
This is useful for clearing session state or recovering from errors.
:return: Success message or error description
:rtype: str |
list_odoo_models | List available Odoo models, optionally filtered by pattern.
Queries the Odoo registry to retrieve all available model names.
If a pattern is provided, only models containing that pattern
in their name will be returned.
:param pattern: Optional pattern to filter model names (case-sensitive)
:type pattern: str
:return: List of model names, one per line
:rtype: str
.. note::
Results are limited to the first 50 matches to prevent overwhelming output. |
odoo_model_info | Get information about a specific Odoo model.
Retrieves detailed information about the specified model including
its description, database table name, and field definitions.
:param model_name: Name of the Odoo model (e.g., 'res.partner', 'sale.order')
:type model_name: str
:return: Formatted information about the model and its fields
:rtype: str
.. example::
>>> odoo_model_info('res.partner')
Model: res.partner
Description: Partner
Table: res_partner
Fields:
name: Char
email: Char
phone: Char
... |