Inventory in Dolibarr: counting and stock adjustments
Learn how to count stock and adjust it in Dolibarr: create and validate the inventory, generate the stock movements and fix the discrepancies.
Inventory in Dolibarr: counting and stock adjustments
How do you run an inventory in Dolibarr? In short: you create an inventory in the "Inventory" module of Dolibarr, count your physical stock, validate the counted quantities and generate the stock movements that adjust the units to what is really in the warehouse. This article walks through that flow step by step and answers the questions that come up most often in forums: how to set stock to zero for the annual count, how sub-warehouses affect things, why stock does not come back automatically when you cancel an order, and how to avoid the typical mistakes.
What is an inventory in Dolibarr?
An inventory is a physical count of your stock: counting the products in the warehouse and comparing them with what Dolibarr has recorded. It is how you find out whether the stock in the system matches reality.
In Dolibarr, the inventory works as a document: you create it for one or more warehouses and a range of products, enter the counted quantity for each product and the system calculates the difference against the recorded stock. That difference becomes the basis for the stock adjustment.
What is a stock adjustment?
A stock adjustment is a stock movement that corrects quantities without going through a purchase, a sale or a shipment. If the count shows fewer units than recorded, the adjustment subtracts them; if there are more, it adds them.
A stock movement is, simply put, each entry that adds or removes units of a product in a warehouse: purchase receipts, sales issues, transfers or adjustments. The inventory is the document that justifies adjustments.
Unlike an order or an invoice, an adjustment is not linked to a commercial document: it is a direct correction of stock levels. That is why it should always be done on top of a validated inventory, with the person responsible for the count behind it, not "by hand" with no record of why the stock changed.
How do you prepare the count?
Half the work is done before you start counting:
- Close pending operations: validate unprocessed shipments and check that no delivered order is missing its stock issue. If you leave operations half-done, the count will not match.
- Define the scope: the whole warehouse or zones and product families. If you sell online, decide whether the count includes the stock of the virtual store.
- Prepare the count: templates, labels or the product list with stock, and assign zones to each person. Count in order (by shelf or family) so you do not skip anything.
- Freeze movements: if you can, avoid sales, returns and transfers while counting. If not, record everything that comes in or goes out so you can correct it before validating.
How do you create and validate an inventory?
- Create the inventory: in the "Inventory" module of Dolibarr, set the warehouse, the date and the range of products to count.
- Enter the count: line by line, enter the counted quantity for each product in its warehouse.
- Review the differences: Dolibarr shows the difference between what was counted and what is recorded. Look for an explanation for each gap (an unrecorded sale, a pending transfer) before moving on.
- Save the count: do not advance without saving.
- Validate the inventory: validation closes the count and calculates the adjustments.
- Generate the stock movements: this is where stock really changes; the differences become adjustment receipts or issues.
Practical tip: a difference of one or two units spread over several products is normal; a large difference in a single product usually points to a counting error or an unrecorded movement. Find the cause before validating.
How is the stock adjustment generated?
When you generate the movements, Dolibarr creates an adjustment entry or issue for each product with a difference, in the right warehouse, with its quantity, date and reason: the inventory count. From then on, those units appear in the product history along with the rest of the movements.
If your goal was to set a product to zero (breakage, expiry, shrinkage), the adjustment does the same: it leaves the units at zero and keeps a record of why.
How do you view and print stock as of a date?
In the "Stock" module of Dolibarr you can see the current stock of each product and each warehouse and review the stock movement history. That list lets you reconstruct the stock as of a specific date, which is very useful when preparing the annual count or when tracking down where a gap came from.
You can also print or export the product list with stock so you can carry it to the warehouse and count with paper in hand.
What happens with warehouses and sub-warehouses?
In Dolibarr, each warehouse has its own stock: there is no single global figure. And there is a detail that confuses many users: the stock of a parent warehouse is not automatically added to the stock of its sub-warehouses, or the other way round; each level is managed separately.
Practical consequence: if you have a main warehouse and sub-warehouses, you count each one and the adjustment only affects the warehouse of the inventory. If you count in the wrong warehouse, or only in the parent and ignore what the sub-warehouses contain, the stock will keep not matching. Always check which warehouse each movement ends up in.
Why doesn't cancelling an order restore the stock?
This is one of the most repeated questions, and the explanation is simple: in Dolibarr stock does not move with commercial documents but with stock movements. An order, even validated, does not subtract units by itself; the issue is recorded with the shipment, when the goods actually leave.
That is why cancelling an order or an invoice does not automatically return units: if the goods already left, you need to manage the return (a goods return or a stock adjustment that records the incoming units). If you cancel before anything is shipped, there is no stock to return: it was never touched.
How does the adjustment affect accounting (inventory valuation)?
Stock is not just units: it also has value. Dolibarr values stock using the weighted average cost (WAC, known as PMP in Spanish): the average purchase cost of the product, recalculated with each purchase according to its quantity. If you buy at a different price, the average cost adjusts.
Stock valuation is the monetary value of your stock (units times their average cost). When you adjust units, the total value changes and, if you keep your accounting in Dolibarr, that change reaches accounting. That is why a well-documented inventory keeps accounting and the warehouse in sync. If you are interested in the accounting side, we have a guide to accounting in Dolibarr.
Common mistakes and how to avoid them
- Generating movements without saving the count: in some versions of Dolibarr, if you edit counted quantities in the inventory and press "generate movements" without saving first, the changes can be lost or incorrect movements can be created. Always save before generating.
- Looking only at current stock: if stock does not match invoices or expectations, check the movement history; there is almost always an unrecorded manual adjustment, return or transfer.
- Counting in the wrong warehouse, especially if you work with sub-warehouses.
- Setting to zero without a count: leaving a product at zero with a direct adjustment and no inventory to justify it breaks stock traceability.
- Forgetting the online store: if you sell online and the store stock is not synchronised with Dolibarr, the count and reality will drift apart. We explain this on stock synchronisation between WooCommerce and Dolibarr.
Frequently asked questions
How do I set stock to zero? Create an inventory for the product and its warehouse, enter the counted quantity as 0, validate and generate the movements. The stock stays at zero with a documented reason.
Can I count while the business is open? You can, but if goods come in or go out during the count the result will not match. The ideal is to pause sales and movements, or write everything down and fix it at the end.
Is validating the inventory the same as generating the movements? No. Validating closes the count and calculates the differences; generating the movements changes the stock. Between both steps you can still review.
Do I need to know accounting to run an inventory? Not for the count. To interpret valuation and average cost, the basic concepts are enough; if your adjustments go into accounting, keep them documented.
Getting started
A good inventory relies on reliable stock information and an orderly process. At EasySoft we help you set up and maintain Dolibarr, including the online store with synchronised stock: we prepare the modules, put the stock in order and support your team so the annual count stops being a headache.
- Store module and Dolibarr synchronization: if you sell online and want the store and the ERP to speak the same stock language.
- Free checklist to set up your store + ERP: so nothing is left behind when preparing your inventory and your online store.
