This guide shows how to make Odoo 18 carry a separate cost for each serial number, so that each unit built to order keeps the cost of the parts that went into it. The short answer: keep the product category on average cost or first in, first out, then tick Valuation by Lot/Serial number on the product. Each manufacturing order then sets the cost of the serial it produces, and the delivery and the sales order margin use that serial's own cost instead of an average.
It is for owners, controllers and operations managers who need the real cost of each unit, for example to pay commission on margin. The steps were verified on Odoo 18 Community.
Before you start
- Version and edition: Odoo 18, Community or Enterprise. The checkbox is new in Odoo 18 and does not exist in Odoo 17.
- Apps: Inventory, Manufacturing and Invoicing (called Accounting in Enterprise). Sales is needed to see margins.
- Serial numbers turned on: open the Inventory app, go to Configuration > Settings and tick Lots & Serial Numbers in the Traceability section.
- Margins turned on: in the Sales app, go to Configuration > Settings and tick Margins in the Pricing section.
- Terms used: valuation is the money value Odoo attaches to the stock you hold. The costing method, set on the product category, is the rule for that value: Standard Price; First In First Out (FIFO), which costs each shipment at the oldest units still in stock; or Average Cost (AVCO), which keeps one running average for all units. A lot/serial number is the identifier recorded on tracked stock, and a serial number identifies a single unit. A manufacturing order records one production run and the components it consumes.
Why AVCO or FIFO alone falls short
Take a door built twice in a test database: once from components costing 35.00 in total, and once from components costing 70.00.
- AVCO without lot valuation: the product has one Cost, the average of 52.50, and every door that ships is costed at that average.
- FIFO without lot valuation: Odoo costs each shipment at the oldest unit still in stock, whichever serial you ship. In a test, shipping the second, more expensive door was costed at the first door's cost.
- Either method with Valuation by Lot/Serial number: each serial keeps its own cost. Shipping the 70.00 door posted 70.00, and the sales order line showed a Cost of 70.00.
With lot valuation on, AVCO and FIFO both value a one-unit serial at what it cost to make. They differ in how a serial's cost can be corrected, covered below.
Turn on valuation by serial number
- Open the Inventory app and go to Configuration > Product Categories. Open the category the product uses and check that Costing Method is Average Cost (AVCO) or First In First Out (FIFO). Settle this first, because Odoo locks it later.
- Go to Products > Products and open the product.
- On the General Information tab, tick Track Inventory and choose By Unique Serial Number in the field beside it. The Valuation by Lot/Serial number checkbox appears below. It stays hidden while tracking is By Quantity.
- Tick Valuation by Lot/Serial number. Odoo saves it straight away, so if the product already has stock, read the section on existing stock first.
How a manufacturing order sets each serial's cost
When a manufacturing order for an AVCO or FIFO product is done, Odoo adds the value of the components it consumed and the time logged on its work orders multiplied by each work center's Cost per hour. A work center is a machine or team where an operation is done, and work orders only exist when Work Orders is ticked in the Manufacturing settings. The total, divided by the quantity produced, becomes the cost of the serial.
- Components keep their own costing method. An AVCO component goes in at its current average, and a FIFO component at the cost of its oldest units in stock.
- One order, one cost per unit. If one order produces several serials, they all share that order's average unit cost, so build one unit per order when each unit's parts differ.
- Standard Price does not do this. A finished product on Standard Price is not costed from its components.
Switching a product that already has stock
- Every unit needs a serial first. If any stock has no serial, Odoo refuses with "Please assign lots to all your quantities before enabling lot valuation."
- Existing stock is revalued at the current Cost. Ticking the box takes the stock out and puts each serial back at the product's Cost. On AVCO that is the average: in a test, doors built at 30.00 and 55.00 both became 42.50.
- Correcting a serial on AVCO. Open the serial and change its Cost. Odoo records a valuation entry for the difference. On FIFO, the same edit changed the field but not the serial's value.
- Changing the costing method before you switch. Move the product to a category that uses the method you want. Odoo takes the stock out at the old method and puts it back at the product's current Cost, so check that figure first.
- The lock afterwards. Once a lot-valued product has stock history, Odoo blocks moving it to a category with a different costing method. It also blocks changing the costing method or Inventory Valuation setting of any category that contains it, which affects every product in that category.
- Turning it off. Odoo asks for confirmation and warns that valuation will then be identical for all serials.
Check that it worked
- Complete one manufacturing order for the product and assign it a new serial.
- In the Inventory app, go to Products > Lots / Serial Numbers and open that serial. Cost and Total Value show what the order cost. Inventory administrators also see a Valuation button that lists its entries.
- Sell the unit. Odoo reserves a serial on the delivery by itself (in a test, the oldest one), so set the serial you are shipping before you validate.
- Open the sales order and show the Cost and Margin columns from the optional columns toggle at the end of the order lines. Cost now matches the shipped serial. Before delivery, the line shows the product's general Cost.
- For a full list, go to Reporting > Valuation in the Inventory app and group by Lot/Serial Number.
In Odoo 19 and 20 the checkbox is labelled Valuation by Lot/Serial and sits in the Traceability section of the product's Inventory tab.
Steps verified on Odoo 18. Menus and labels can differ on other versions.
Common questions
Does FIFO give each serial number its own cost in Odoo 18?
Not on its own. Without Valuation by Lot/Serial number, FIFO costs each shipment at the oldest unit still in stock, whichever serial is shipped. Ticking that checkbox on the product makes the shipment use the shipped serial's own cost.
Where is the Valuation by Lot/Serial number checkbox in Odoo 18?
On the product form, on the General Information tab, below Track Inventory. It appears once Track Inventory is ticked and tracking is set to By Lots or By Unique Serial Number.
How does Odoo 18 work out the cost of a manufactured serial number?
When the manufacturing order is done, Odoo adds the value of the components consumed and the work order time at each work center's Cost per hour, then divides by the quantity produced. This applies to products whose category uses AVCO or FIFO.
Can I turn on valuation by serial number for a product that already has stock?
Yes, as long as every unit in stock has a serial number. Odoo revalues the existing serials at the product's current Cost, so on AVCO they all start at the average, and you can then correct each serial's Cost on its form.
Why can't I change the costing method of a product category in Odoo 18?
If the category contains a product valued by lot/serial number that already has stock history, Odoo blocks changes to the category's costing method and Inventory Valuation setting. It also blocks moving that product to a category with a different costing method.
Talk to the team.
If you are setting this up, or Odoo is not behaving the way this guide describes, book a 30-minute call. We will look at your configuration and tell you what it needs. Calgary studio, in-house team, no offshore handoffs.
Book the call →