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.
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.
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
4. Create and validate the associated bill
we have to create and validate the bill associated with the purchase order.
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.
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:
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.