Full-featured interactive IPython console for Odoo development, replicating PyCharm Console functionality with enhanced Odoo-specific features and a beautiful Rich user interface.
- Beautiful Output - Powered by Rich for colorful tables, panels, and inspection.
- PyCharm-like REPL - Full interactive shell with automatic result display.
- Smart Inspection - Deep object introspection with syntax highlighting.
- Multiline Editing - Smart auto-indent for code blocks.
- Persistent History - Command history saved between sessions.
- Enhanced Autocompletion - Jedi-powered with Odoo model awareness.
- Preloaded Environment -
envready for immediate ORM operations. - Smart Model Completion - Tab-complete model names, fields, domains.
- Domain Builder - Autocomplete operators and field values.
- Transaction Control - Visual feedback for commit/rollback.
This project is now a proper Python package.
-
Clone the repository:
git clone https://github.com/AlexTkDev/ipython-console-to-VScode.git cd ipython-console-to-VScode -
Install in editable mode:
pip install -e .This will automatically install all dependencies including
odoo,ipython, andrich.
Once installed, you can use the odoo-console command:
odoo-console -d your_database_nameYou can still use the wrapper script if you prefer:
python3 odoo_IPython_Console.py -d your_database_name# Custom config file
odoo-console -d mydb -c /path/to/odoo.conf
# Disable autocompletion
odoo-console -d mydb --no-autocomplete
# Safe mode (restrict write operations)
odoo-console -d mydb --safe-mode| Command | Description | Example |
|---|---|---|
env |
Odoo ORM environment | env['res.partner'] |
show(record) |
Pretty-print records with Rich tables | show(partners) |
lsmodels() |
List all models with descriptions | lsmodels() |
lsfields(model) |
List model fields with types | lsfields('sale.order') |
lsallfields(model) |
Fields with sample values | lsallfields('res.users') |
lsvars() |
List all workspace variables | lsvars() |
inspect_obj(obj) |
Deep object inspection (Rich) | inspect_obj(env) |
profile_query(func) |
Profile function performance | profile_query(search_func) |
q(model, domain) |
Quick search with domain | q('res.partner', [('id','=',1)]) |
commit() |
Commit transaction | commit() |
rollback() |
Rollback transaction | rollback() |
# Search and display records with beautiful formatting
partners = env['res.partner'].search([], limit=5)
show(partners)# Inspect any object, model, or function
inspect_obj(env['res.partner'])- History: Saved to
.odoo_console_historyin the current working directory. - Rich Theme: Uses standard Rich themes for best readability.
- Install dev dependencies:
pip install -e ".[test]" - Run tests:
pytest
LGPL-3.0