View source | View content page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Show collection (0 pages)
Collections help


Projects:AverageCostRefactor/What's New



This document is intended to be the central source of information about the new "Costing" engine in Openbravo.

This document is also intended to answer basic doubts with links to other documents where more detailed information can be found.

What is different

The Legacy Costing Engine had some functional and technical limitations that made it difficult to be improved.
The aim of the new engine is to solve those limitations while making it easier to adapt to the user needs.

Therefore there is a list of new features that all Openbravo users should be aware of, which changes the legacy basic features of the cost calculation:

Costs are calculated at Legal Entity level
In the previous engine the costs were calculated at client level, therefore the cost were shared across all Legal Entities. This new engine calculates the cost for each Legal Entity which makes more sense from a functional point of view. It is also possible to go further in detail and have costs calculated at warehouse level.
Cost are calculated in the Currency of the Legal Entity
One of the main drawbacks of having costs calculated at client level is that all costs were calculated in the same currency. Therefore, having "Legal Entities" working in different currencies was difficult to handle from the costing calculation point of view as it always required currency conversion on one of the Legal Entities. The new engine uses the currency configured in the Legal Entity, and only if a currency is not configured at organization level, it uses the currency of the client. This enables the possibility of having the costs of an organization located in USA calculated in USD and the costs of an organization located in Europe in EUR.
Additional Costing Algorithms delivered by Extension modules
Previous engine only supported "Average" and "Standard" costing methods. The new Cost Engine delivers these two costing algorithm by default and besides it supports the development of new ones such as FIFO, LIFO, Specific Identification by using Extension Modules.
Cost configured using Costing Rules
Although we consider that it is not an usual action the cost engine is configured by using Costing Rules. The costing rules are valid during a given period of time, this feature enables the users to change the Costing Method in an easy way at any point in time. For instance it is possible to calculate the cost by warehouse or it is possible to change the costing algorithm from Average to FIFO if required.
Costs calculated by transactions
The previous engine calculated the new average cost of a product on each Goods Receipt and this average cost was used directly in accounting, processes and reports by multiplying it by the product quantity. The new engine calculates the total cost amount of each transactions and these amounts are then used by accounting, processes and reports. This new way allows to keep a more accurate cost history. Same way it allows to get a better alignment with accounting as the balance of a item can be calculated at any time adding the cost amounts of all its transactions.
Cost calculated by a background process
The legacy engine required a manual execution of the cost process. The new engine delivers a background process that can be scheduled to be run automatically.
Costs are calculated only once (Perpetual Cost)
Other main drawback of the legacy engine was that every time the cost process was run the costs were recalculated, this behaviour forced users to unpost documents. The new engine does not recalculate the cost of a transaction. This ensures that once a transaction is cost calculated and posted it will be permanent.
All transactions are calculated
Previous engine calculated the average cost of the Goods Receipts and/or of the Work Efforts, each one with its own process. The new engine calculates the cost of all transaction types from a centralized process.

How to use it

How to start using the new Costing Engine

There are different scenarios to consider while starting to use the new costing engine:

New instances starting on MP13 or later
In this case the user do not need to take any action but just to configure the instance and create Costing Rules.
Upgraded instance which do not calculate costs
Instances that have never used costs calculation can start also without taking any particular action.
Having said that, it is possible to calculate all past transactions cost or set a starting date from which the cost of the transactions is going to be calculated.
Upgraded instance which do calculate costs
In this case the user has to execute the Costing Migration Process. This process initialize the new "Costing Engine" by using the cost calculated by the "Legacy Costing Engine".

How to configure the new Costing Engine

In the new engine all the configuration is done through the Costing Rules. This implies that to set up the product cost type in the Product window is no longer needed.

Now, when a "Legal Entity" has a validated Costing Rule the cost of all the transactions having an Item product type set up as Stocked are calculated by using the Costing Algorithm defined in the "Costing Rule".

Once the needed Costing Rule is defined it is time to schedule the Costing Background process.

Notice that:

Default Cost

The new cost engine introduces a new concept which is the Default Cost. This cost can either be the product purchase price list or the product standard cost if any.

All the transactions are cost calculated by the "Costing Background Process", therefore this process has to be able to get the price of every transaction.

Most cases this information can be retrieved from the document which originated the transaction, for instance the price of a Goods Receipt transaction is retrieved from the net price of the corresponding Purchase Order.

However, in other cases this information is not available so it is required to have a defaulted cost.
For instance, a Physical Inventory that initializes the stock, if the inventory lines of the physical inventory do not have a unit cost defined the process has to use the Default Cost in order to calculate the cost amount of the inventory line.

The Common Transactions Types section of the "Costing Server" document describes how the cost is calculated for each transaction.

How to review the costs

Once the costs are calculated it is possible to review them. There are several reports and windows where the calculated cost can be checked:

What is pending

Although the Cost Engine is available since MP13 there are a number of features that are not implemented yet but in future releases:

Manufacturing Costs
This cost type is partially implemented in the new engine. The way it works now is: the manufacturing costs are calculated by the new background process but using the legacy procedures. All products with the Production flag checked are calculated by using the "Average" Algorithm. The costs in this case are calculated at client level as in the legacy engine.
Undo Costs
In some cases it is needed to recalculate cost from scratch for whatever kind of reason, for instance because of a wrong conversion rate which has been fixed. This process based on a given date would require to unpost all related documents and delete the costs calculated after that date.
Landed Costs
Ability to define landed costs as freight amounts or customs duties.
Costs Adjustments
Ability to modify the costs of a transaction without the need of recalculating or unpost the related documents. For instance changes in cost due to a landed cost application.

How to adapt custom processes and reports

In case the Openbravo instance is using a custom process and report it is needed to adapt those to the new Cost Engine. This is needed because the source of the costing data has changed.

Retrieved from ""

This page has been accessed 1,625 times. This page was last modified on 21 December 2012, at 08:21. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.