Where the item is
Where is the product, and how much is in each bin?
Verified Metric version 1.0.0
What it is
For each code asked (the SKU or the barcode), today's stock in each internal location of the company: the location, the quantity, how much is reserved and the lot. Each row says whether the location is a bin (it has no other location inside) or a loose location that has bins inside it. The total is the sum of the stock in internal locations.
What it is not
- It is not the stock available to sell: the reserved quantity is on the row, but not taken off the total.
- It does not include what is in transit, at the customer, at the supplier or in inventory adjustment.
- It does not search by name: only by the SKU or barcode written in the question.
Pitfalls this metric handles
The traps a hasty calculation falls into — and how this metric avoids each one.
Archived product with the same code
- The mistake
- Searching only active products.
- Why it happens
- The code may be on an archived record that still has stock somewhere.
- How we handle it
- It searches active and archived products; the archived one is marked on the row.
Loose stock mistaken for a bin
- The mistake
- Treating every internal location as a shelf.
- Why it happens
- Stock in a location that has bins inside is an item nobody knows the shelf of.
- How we handle it
- Each row says whether the location is a bin or loose.
Code that does not exist
- The mistake
- Answering zero for a code that is not on file.
- Why it happens
- Zero looks like "no stock", and the problem is the code.
- How we handle it
- A code that does not exist goes in an alert, apart from a code that exists and has no stock.
Where the number comes from
Audit trail
- Odoo model
stock.quant + stock.location + product.product- Fields
stock.quant.quantity,stock.quant.reserved_quantity,stock.quant.lot_id,stock.location.complete_name,stock.location.usage,product.product.default_code,product.product.barcode- Why this path
- stock.quant is each product's stock in each location, the same Odoo shows in Inventory → Reporting → Stock.
How you can adjust it
| Parameter | What it does | Options |
|---|---|---|
| Companies | company ids, always explicit | — |
| Codes (SKU or barcode) | the SKUs or barcodes written in the question | — |
| Items listed | how many rows to show on screen; the Excel file carries all | — |
Validation
To be validated on a real database. The method comes from a script that already ran in a customer's operation, and the calculation passes the automated tests against the demo database. IntData has not yet checked it on a real database; until then, check the first result in Odoo using the path in the audit trail.
- Date
- November 10, 2026
- Checked against
- Demo database, location by location. To be validated on a real database.
- Expected Odoo versions
14.0,15.0,16.0,17.0,18.0,19.0,20.0- Note
- The fields read exist from 14 to 19 and on master (the reference for 20), checked in the official code. It does not use read_group.
Need a variation of this metric, or another one that does not exist yet?