Tag: Python

How to Use the Action Window in Odoo v15

ir.actions.act_window is the most used action when we create an applications in the Odoo ecosystem. If we call this action, Odoo will render the view of the model, so the user can perform some CRUD operations on the model. The interesting part is, we don’t need to create a route, a controller, or the javascript ….  Read More

How to Record the Data Changes in Odoo

In the odoo Sales menu, if you open the Quotation or Order menu, at the very bottom of the form there will be a block. If you make changes to the sales order form, for example changing the customer name, changing the price, etc, the changes will be recorded in that block. As shown below. ….  Read More

How to Create an Excel Report File in Odoo

To create reports in PDF or HTML file odoo has provided its own model, namely ir.actions.report. With this model, we can create PDF and HTML reports quite easily, without having to think about how to retrieve data from the database or how to download the reports. Unfortunately, to create reports in an excel file, we ….  Read More

How to Write Odoo Domain in Easy Way

In odoo, domain is a list that contains certain expressions that are used to filter some data from the database. Domain will be translated by odoo into an SQL expression to fill the where clause. For example, if we have a domain like this. [(‘state’,’=’,’draft’)] The domain above if applied to the sale.order model will ….  Read More

How to Use Odoo’s Context Like a Pro

Context in odoo ecosystem is a python dictionary which is usually used as a marker to turn a feature off or on. With a context we can set a model to have different features if opened from different menus. For example, let’s say we have a master product like the picture below. Pay attention to ….  Read More

What is External ID in Odoo ?

When you work with odoo, have you ever had any questions about what is an External ID ? Like when you are going to export some data, for example the customer as shown below ? Or when you edit a form. What exactly is an External ID ? And what does it do ? Basically ….  Read More

How to Use a Transient Model in Odoo

Transient model is a model in odoo where its data will be deleted periodically. Since the data will always be deleted, of course it is not recommended to use this model to store the real data. Usually, this model is used as a wizard or as a connector between several models, for example to show ….  Read More

How to Use System Parameter to Store the Application Configuration in Odoo

System parameter in odoo is a model with a key value pair format that is used to store the application configuration. System parameter are only used to store the configuration, the real implementation must be manually programmed in each model as needed. The model of the system parameter is a ir.config_parameter. System parameter are usually ….  Read More

How to Use Onchange and Compute in Odoo

In odoo there are 2 ways of how to calculate the value of a field automatically. We can use the onchange decorator or the compute field parameter. Use the onchange decorator if we want the value of some field change automatically when the value of another field is changed by the user. For example, let’s ….  Read More

Understanding Large Framework Source Code Better With GREP

grep is a tool to find text in files. For example, if we have 1000 files, if we want to know what files that contain the word of “indonesia”, using grep we can find it easily. grep is a tool that runs via the command line or terminal. Usually grep is among the default application ….  Read More