Odoo Studio - Our practical experience
How to recognize opportunities and avoid pitfalls
7 December, 2023 by
Odoo Studio - Our practical experience
manaTec GmbH, Denis Orechov
 


There are many useful modules for Odoo that map processes and thus facilitate the digitalization of your company. Since Odoo 10, it is even possible to make adjustments to your system independently with Odoo Studio.

If you are interested in learning more about Odoo Studio, this blog post is for you!

What application does Odoo Studio have?

Odoo Studio offers a variety of benefits and features. You can see and save the results of your customizations in real time by dragging and dropping the views you want. Odoo Studio creates the necessary code directly from the interface. New or existing fields, views and menu items can be created, moved, edited or removed in this way. In this way, new sections and fields can be visually placed in the desired position.

User interface of Odoo Studio

PDF documents can also be quickly changed or created with Odoo Studio - without any programming. This makes it easy to create mobile apps for desktop and mobile devices. It is also possible to scale processes regardless of company size and data volume.

The screenshot below shows Odoo Studio applied to a sales order. PDF modules can now be placed using drag-and-drop.

Odoo Studio sales order example

Odoo Studio is also a very successful tool for functional prototypes, especially with a focus on UI/UX. However, this convenience comes with costs and risks, which we would like to draw your attention to in this blog post. In the following sections, we will therefore first discuss general safety precautions for development and then highlight the technical features of Odoo Studio using a practical example.

Working cleanly with Odoo Studio:

Before you start making adjustments to your live or test system with Odoo Studio, it is worth estimating how much time the adjustment will save. In general, it is important to define the requirements of the customization and its implementation so that they are comprehensible for you and other developers at a future point in time.

If you want to extend the functionality of Odoo, first look for ready-made modules in the Odoo Apps Store. If you want to add a new field, use the search function in Odoo Studio for the Odoo view you want to customize to avoid duplicate fields and save yourself duplicate work. If you cannot find a field in the Odoo Studio search, it may be that the field is already placed in the view but is not visible. In this case, you can display all invisible fields in Odoo Studio.

Regardless of whether you have already purchased Odoo Studio or want to get an independent insight into how it works, we recommend that you use the free and public Odoo Runbot. The four latest Odoo versions are available here for everyone to experiment with. Select one of the instances and click on the blue button next to "Enterprise". 

Odoo Runbot

You can log in as an administrator (e-mail: "admin", password: "admin") to work with Odoo Studio. You can test your customizations from a user's perspective by logging in as a demo user (e-mail: "demo", password: "demo"). This way you can discover what Odoo Studio has to offer in a secure environment.

If an error message occurs during your customizations with Odoo Studio, you can easily switch to another Runbot instance. Although the instances are set up several times a day, it goes without saying that no personal data should be stored.

If you have already purchased Odoo Studio for your test or live system or have already made initial adjustments in Runbot, we would like to point out that you should create a backup of your databases now at the latest. You can use Odoo's database manager and duplicate the database. When customizing PDF reports, it is recommended to duplicate the templates provided by Odoo instead of overwriting the Odoo standard.

All customizations made with Odoo Studio can be found in the "studio_customization" module generated by Odoo in the apps.

Customization Modul

You can export all customizations at any time by starting Odoo Studio in the main menu and clicking on "Export" at the top left under "Customer customizations". This is also possible in Runbot.

Odoo Studio Export

If parts of your Odoo instance no longer work due to studio customizations, all customizations can be exported and the "studio_customization" module deactivated. It is important to export the module before it is deactivated, otherwise the module cannot be found again!

The Odoo platform as a whole is constantly changing. This may mean that your customizations created with Odoo Studio - depending on their complexity - will no longer work when migrating to future Odoo versions. 

So far, we have presented useful tips for secure development with Odoo Studio so that you can avoid error messages and build your own prototypes in the Runbot. Now we will focus on technical aspects of Odoo Studio using an example.
 
The functionality of Odoo Studio in practice:
 
Suppose you want to use Odoo Studio to place another field in a form view to customize Odoo to your needs.

Odoo Studio enables this customization by creating a technical field name with "x_studio_" prefix for your field or model. This field is now a fully-fledged part of the Odoo system whose value can be read via linked models in other areas. In addition, Odoo records the position of your customization and generates an extended view in XML format. This can be recognized by "Studio Customization" in the name of the view.

If you remove the field from the view, it will of course remain in the system even though it is no longer in the view. The extended view generated by Odoo is updated, but remains active as a whole. All adjustments are written to the end of the generated XML file. This quickly leads to even small repeated customizations contributing to cluttered code, making a migration at a later date much more complex.

If your customizations are related to PDF reports, it may be useful to enable debug mode to access the code editor through Odoo Studio. However, it is not advisable to edit XML code via Odoo Studio, because even supposedly small errors can make many views inaccessible at the same time.

Conclusion:

Of course Odoo Studio has added value, but we find that in the long term the cost of maintaining the automatically generated code is higher than the short to medium term benefit of a quickly created customization. It's tempting to do your own development quickly with just a few clicks, but the value of your Odoo system lies in its rapid customization capabilities. Odoo Studio is very versatile and allows you to customize almost all aspects of Odoo, but also creates more opportunities for potentially serious errors.

Even a clean and error-free customization with Odoo Studio reveals the following problems:
The code created by Odoo Studio, which quickly becomes confusing, as well as the fact that all customizations are contained in a central "studio_customization" module instead of being broken down modularly to the customized areas, has the consequence that Odoo Studio impairs the said customizability of your Odoo system as a whole. This does not mean that Odoo Studio slows down the system, but that the quality and structure of the generated code creates so-called "technical debt”. Technical debt increases if the work is not done properly and the quality of the code is neglected. To prevent technical debt, you should take the effort estimation, documentation and security precautions mentioned at the beginning seriously. Convince yourself of the generated code quality by making several adjustments in different places in the Runbot with Odoo Studio, exporting them and then viewing the files. 

We hope that the information in this blog post has helped you to gain a better understanding and awareness of how to work with Odoo Studio.
You should not lose sight of the impact that using Odoo Studio can have on the future of your system.

The Odoo experts at manaTec specialize in understanding your needs, developing an intelligent solution, identifying technical debt and programming the optimal solution. Contact us now, if you have any further questions about Odoo Studio!


 
Efficient time tracking
Connection of an NFC card reader (time tracking terminal) to Odoo