Average Costing Techniques in Odoo
Manage Inventory Cost with Odoo's Average Costing Method

by Muhammad Kamran

Odoo employs an interesting average costing process for products. This method utilises a formula that calculates the cost based on the sum of the amounts divided by the available quantity.

The average costing process involves the following steps:

1. Set up Average Costing (AVCO)

The first step is to set the costing method as Average Costing (AVCO) in an existing or newly created category.

Screenshot of setting up average costing in Odoo

2. Start the average costing process

From the data marking of step 1, the process of average costing will start, but it is a base flow of Odoo and it depends on the iteration of the complete purchase flow. Let's consider an example shown in the screenshot below, where we need to start by generating a purchase order.

Screenshot of generating purchase order.jpg

3. Validate receipt and quantity

After generating the purchase order, the next step is to validate the receipt and receive the quantities of the ordered products.

Screenshot of validating receipt and quantity in Odoo

4. Create and validate the associated bill

After receipt, we have to create and validate the bill associated with the purchase order.

Screenshot of creating and validating the associated bill

5. Examine the effect on product cost

At this point, the purchase flow concludes. Now, let's examine the effect of this process on the cost of products.

Screenshot of the effect on product cost

Utilising a simple trick for average costing

As discussed earlier, we can achieve the average costing method by running the Odoo purchase flow. However, if you wish to update the cost based on average without running the purchase process, you can use a simple trick.

For every transaction you make from your custom module in the inventory using transfer, remember to add the cost to the price_unit field of account.move. Please note that this field is hidden in the general form. For reference, kindly see the screenshot below:

Screenshot of simple trick for average costing method

To achieve this, you can utilise Python code to add the required data to that specific field. However, the product must be assigned to a category with the AVCO costing method enabled.

How to migrate a POS module from Odoo V12 to Odoo V16?
Here’s a general outline of the migration process