Odoo.sh Online Editor Guide
By Braincuber Team
Published on January 28, 2026
Installing VS Code, configuring SSH keys, cloning repos, setting up virtual environments—that's the traditional Odoo development workflow. Odoo.sh eliminates all of it. The built-in online editor gives you a complete IDE in your browser: file explorer, code editor, terminal, Python console, and Odoo shell. Edit a model, update a view, commit to Git, and deploy—all without leaving your browser tab.
This guide covers every feature of the Odoo.sh online editor. You'll learn the file structure, how to edit code safely, use the integrated terminals and consoles, commit changes to GitHub, and follow best practices that prevent production disasters.
What You'll Learn: Access the editor from any build, navigate the file structure, edit Python/XML/JS files, use the Odoo shell for live queries, commit and push code to GitHub, and avoid common mistakes that break production.
Editor Features at a Glance
Full Code Editor
Syntax highlighting, search/replace, multiple tabs, file tree navigation. Edit Python, XML, JavaScript, CSS, and SCSS files directly.
Integrated Terminal
Full Linux shell access. Run odoo-bin commands, install pip packages, execute database queries, manage files—everything you do locally.
Python & Odoo Console
IPython console for testing code. Odoo shell with full ORM access—query models, update records, test business logic live.
Git Integration
Stage, commit, and push directly from terminal. No SSH keys needed—authenticate with GitHub Personal Access Token.
Accessing the Online Editor
Open Editor from Odoo.sh Dashboard
Navigate to your project and select any development or staging branch.
Two access methods:
- Click the Editor button in the Branches tab
- Use the Builds dropdown menu and select "Open in Editor"
# Replace with your build URL https://myproject-feature-123.dev.odoo.com/odoo-sh/editor # Pattern: https://[build-name].[environment].odoo.com/odoo-sh/editor # environment: dev (development), staging, or empty for production
Production Branches: The editor is read-only for production builds. You can view code but cannot modify it—this protects live systems from accidental changes.
File Structure Overview
Understanding Directory Layout
Every Odoo.sh build follows a consistent structure. Know where to find source code, logs, and data.
Key Directory: /home/odoo/src/user/ contains your custom modules. This is the only directory you should modify. Changes to odoo/ or enterprise/ are overwritten on rebuild.
Editing Code
Modify Files in the Editor
Click any file in the tree to open it. Changes auto-save but don't persist until committed to Git.
Editor capabilities:
- Syntax highlighting for Python, XML, JavaScript, CSS, SCSS
- Find and Replace (Ctrl+F, Ctrl+H)
- Multiple file tabs
- Go to line (Ctrl+G)
- Undo/Redo with full history
Important: For database-stored data (field labels, view definitions, translations), you must update the module after editing. Changes to views/*.xml or data/*.xml require module update.
Update Module After XML Changes
Reload views, data, and translations into the database.
# Update single module odoo-bin -u my_custom_module --stop-after-init # Update multiple modules odoo-bin -u module1,module2,module3 --stop-after-init # Update all installed modules (slower but complete) odoo-bin -u all --stop-after-init
Alternatively, use the Odoo menu: Odoo → Update current module after opening any file from that module.
Using the Terminal
Open Terminal Session
Access a full Linux shell for running commands, debugging, and file management.
Open terminal: File → New → Terminal
# Navigate to custom modules cd ~/src/user # View server logs (live) tail -f ~/logs/odoo.log # Search for text in Python files grep -r "def compute_total" ~/src/user/ # Install Python package pip install pandas # Run database query psql $PGDATABASE -c "SELECT id, name FROM res_partner LIMIT 5;" # Restart Odoo server odoosh-restart
Python & Odoo Console
Use the Odoo Shell
Query models, test methods, and manipulate data directly—with full ORM access.
Open shell: File → New → Odoo Shell
# Fetch all users
users = env['res.users'].search([])
for user in users:
print(f"{user.id}: {user.name} ({user.email})")
# Find specific partner
partner = env['res.partner'].search([('email', '=', 'john@example.com')], limit=1)
print(partner.name, partner.phone)
# Update a record
partner.write({'phone': '+1-555-123-4567'})
env.cr.commit() # Commit the transaction
# Test a compute method
order = env['sale.order'].browse(42)
order._compute_amounts()
print(f"Total: {order.amount_total}")
# Execute raw SQL
env.cr.execute("SELECT COUNT(*) FROM sale_order WHERE state = 'sale'")
result = env.cr.fetchone()
print(f"Confirmed orders: {result[0]}")
Warning: Odoo shell changes are immediately committed to the database. There's no undo. Test on development/staging branches only. Never use shell to modify production data without proper backup.
Committing Changes to GitHub
Push Code to Repository
Changes in the editor are temporary until committed. Use Git commands in the terminal to persist your work.
# Navigate to user modules cd ~/src/user # Check status git status # Stage all changes git add . # Or stage specific files git add my_module/models/sale_order.py git add my_module/views/sale_views.xml # Commit with descriptive message git commit -m "feat: add discount calculation to sale orders" # Push to GitHub (use HTTPS remote) git push https HEAD:feature/discount-calculation # If prompted for credentials: # Username: your-github-username # Password: your-github-personal-access-token
GitHub Authentication: Use HTTPS (not SSH). If you have 2FA enabled, generate a Personal Access Token at GitHub → Settings → Developer settings → Personal access tokens. Use the token as your password.
Best Practices
Never Edit Production
Production source code is read-only for a reason. Make all changes on development branches, test on staging, then merge to production.
Commit Often
Only committed code persists across builds. Uncommitted changes vanish when the container rebuilds. Commit early, commit often.
Test Before Push
Run tests locally in the editor terminal before pushing. Use odoo-bin -u module --test-enable to validate changes.
Pull Latest First
Before starting work, ensure you're on the latest branch revision. Run git pull to avoid merge conflicts later.
Conclusion
The Odoo.sh online editor eliminates local development environment setup. You get a full IDE—code editing, terminal, shell, and Git—in your browser. Edit a Python model, update a view, test in Odoo shell, commit to GitHub, and watch Odoo.sh rebuild automatically. For rapid prototyping, quick fixes, and on-the-go development, it's the fastest path from idea to deployment.
Quick Reference: Access editor via /odoo-sh/editor URL. Your code lives in ~/src/user/. Use Odoo shell for ORM queries. Commit with HTTPS remote. Never modify production directly.
