Odoo 17 Studio Book - Define Compute Method

In Odoo we can calculate the fields in two ways, depending on other fields and not depending on the other fields. On this page, we are going to discuss how to define a compute method using the studio module.

Let's check how to define a compute method to calculate the total quantity of Sale Orders.

For that first of all we have to create a field for the quantity in the Sale Order model.

odoo-studio

To define a compute method for this field go to the more option that is in the editor.

odoo-studio

In the opening view, we can add dependent fields and a Python code for the field.

odoo-studio

We are defining it shown in the image below.

odoo-studio

At the end, you will be able to see the total quantity of the products in the field.

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