# How to Control Costs and Analyze margins with ODOO

How to Control Costs and Analyze margins with ODOO.

Cost calculation and control is an essential function in any company, including those companies that have ODOO installed.

## Why is cost calculation and control important in ODOO?

Mainly for 2 reasons.

Reason 1. To value inventory. In some countries, inventory changes entries are required at the end of the financial year, and this is done with the value of all the stock at a certain date.

It is also often used to analyze financial and logistical ratios that allow evaluating the optimal state of the value of the stock.

Reason 2. Analyze the margins or profitability of the sales achieved.

In this way the company can analyze in which sales it earns more money or perhaps loses money.

This type of analysis can be extended and can be carried out for a specific period of time, or even to compare several periods or against an objective, as well as to analyze and control the margins by products, product categories, commercials, sales channels, geographical areas (states, countries…) in other words to know where the company makes more money.

When this type of analysis is performed, it is usually released that in most cases the Pareto 80/20 rule works, for example, if we perform a margin analysis of products sold, possibly 20% of the products will generate approximately 80% of the company’s total margin.

This information is useful for making decisions and rethinking strategies.

But how do we know if the costs in ODOO are calculated properly?

First of all, we need to understand how costs work in ODOO.

I’m going to show a case. A company to which I provide the Management and Financial Control service & functional consulting and ODOO training, asked me for help with cost control.

The company has thousands of sale products.

Some of the products are purchased, stored and sold, others are manufactured and others are delivered to the customer directly from the supplier without a warehouse storage (dropship).

In other words, 3 types of logistics processes for thousands of products.

The cost calculation system used for all is the average cost, which made things easier.

In ODOO the costs are transferred through stock movements, so first it was necessary to find out if the processes were performed correctly, so it was necessary to analyze the stock movements, the value of the inventory and the cost in the product form.

For products that are purchased and stored, the process is the simplest and ODOO performs it correctly in a core implementation. Here there is no problem.

In manufacturing products, we know that the basic cost of a production is not transferred to the movement of stock and therefore the manufactured product literally does not receive any cost.

Thus, a module development is required to perform this process.

Luckily, the ODOO partner of this company had developed a module that solved this problem. In other words, the manufactured product does receive the costs of the resources consumed (raw material, direct labor…)

Another possible problem could be in the dropship, since there is no movement of stock in the company’s warehouses, the cost would not be transferred from the entries to the warehouse and then to the subsequent outgoing, as occurs with stored products.

Fortunately, the company had a procedure through which, once the purchase from the supplier has been validated, the cost is manually modified in the sales order line by the person who is responsible of administrative tasks in the Purchase Department.

Perfect!! Problem solved.

## Development of a Cost Control System for ODOO

After the study done, everything seemed to indicate that the company had good procedures in terms of cost calculation.

But the problem was in control.

They did not know if these solid processes that they had developed were being fulfilled.

They wondered if the cost of the stock value was correct or if the cost of the sales order line was the one that really corresponded.

What they needed was an alert system that would indicate if there was an anomaly in the calculation of costs, an easy-to-detect alarm that would allow them to quickly make adjustments, detect errors and put in place solutions with procedures to try to avoid them.

And that’s what I built them.

A cost control system with alerts by crossing information on stock movements with the costs of the item records.

Once the errors were detected, the company could correct them.

To establish the cost control system, I created 3 Excel files, a file for importing ODOO data and calculating the necessary data. And another file that received the calculated data from the first one and showed the alerts. And a third file to analyze the margins of products, customers and sale persons, statesâ€¦

Here you have some images of the files prepared for the cost control system.