Enable Dark Mode!
odoo-sh-a-complete-guide-to-the-online-editor.jpg
By: Abbas P

Odoo SH: A Complete Guide to the Online Editor

Technical Odoo 18 Website&E-commerce

Managing and customizing your Odoo projects has never been easier, thanks to the Odoo SH Online Editor. This powerful tool allows developers to directly edit source code, access consoles, and execute commands — all from the comfort of a web browser.

Whether you're debugging, adding new features, or running test scripts, the online editor provides a complete development environment right inside your Odoo SH instance.

Accessing the Online Editor

To open the online editor for any build, you have multiple options:

* Use the Branches tab or the Builds dropdown menu in Odoo SH.

* Manually append /odoo-sh/editor to your build domain URL.

Example:

https://your-build-name.dev.odoo.com/odoo-sh/editor

Odoo SH: A Complete Guide to the Online Editor-cybrosys

Understanding the File Structure

Once inside the editor, you’ll see a structured file tree organized into different folders. Here’s a breakdown of the most important directories:

/home/odoo/
¦
+-- src/
¦   +-- odoo/         ? Community Edition source code
¦   +-- enterprise/   ? Enterprise Edition source code
¦   +-- themes/       ? Odoo themes repository
¦   +-- user/         ? Your custom modules and codebase
¦
+-- data/
¦   +-- filestore/    ? File uploads and binary field data
¦   +-- sessions/     ? Session storage
¦
+-- logs/
    +-- install.log   ? Logs during database installation
    +-- odoo.log      ? Runtime server logs
    +-- update.log    ? Logs for module updates
    +-- pip.log       ? Python package installation logs

Editing Code

You can modify Python files, XML views, JavaScript assets, and more. Just double-click any file in the left panel to start editing.
* Use File > Save or Ctrl + S to save your changes.
* If you're editing a file within the addons path, Odoo will automatically reload and apply the changes without needing a restart.

Odoo SH: A Complete Guide to the Online Editor-cybrosys

Note: For database-stored changes (e.g., field labels, views), you must update the module manually.

Use:

Odoo ? Update current module

Or run in terminal:

odoo-bin -u your_module_name --stop-after-init

Committing and Pushing Changes to GitHub

To make your code changes permanent and usable in future builds, follow these steps:

* Open a new Terminal:

File > New > Terminal

* Navigate to your working directory:

cd ~/src/user

* Stage, commit, and push your changes:

 git add .
 git commit -m "Your commit message"
 git push https HEAD:<branch>

Authentication Note:

* Use the HTTPS remote (https) instead of SSH.

* If you have 2FA enabled on GitHub, generate a Personal Access Token and use that as your password.

Odoo SH: A Complete Guide to the Online Editor-cybrosys

Using Consoles

The online editor also lets you work with different types of consoles:

* Python Console

Run Python scripts with enhanced visual output using IPython, perfect for quick tests or data manipulation.

Odoo SH: A Complete Guide to the Online Editor-cybrosys

* Odoo Shell Console

Get deep into the Odoo backend. Directly interact with models and manipulate records safely (but carefully!).

env['res.users'].search_read([], ['name', 'email', 'login'])

Warning: Changes made here are directly committed to the database — use with caution.

Odoo SH: A Complete Guide to the Online Editor-cybrosys

Displaying Data Visually

Combine Python with libraries like pandas to display tabular or graphical data right in your console.

Odoo SH: A Complete Guide to the Online Editor-cybrosys

Best Practices

* Never edit production builds: Source code in production is read-only for a reason — to avoid live issues.

* Commit often: Only committed code persists across builds.

* Test before you push: Use staging builds for safe testing.

* Stay up-to-date: Make sure you're working on the latest branch revision to avoid conflicts.

Final Thoughts

The Odoo SH Online Editor is a developer’s dream, offering a streamlined and integrated workflow for rapid Odoo customization and testing. By combining code editing, console access, and Git integration into a single interface, it saves time and boosts productivity.

If you haven’t explored it yet, dive into your Odoo SH build and give the online editor a try!

To read more about How to Deploy Module in Odoo 17 Using Odoo.sh, refer to our blog How to Deploy Module in Odoo 17 Using Odoo.sh.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp_icon
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message