Repurchasing
Which month you run out, and how much to order so you don't
Projects four months ahead by crossing stock on hand, average sales and goods in transit, flags the month each product runs out, and suggests how much to reorder with a safety margin. Built for importers, who cannot afford to react late.
How you get it
Every development works in all three Odoo environments. The only thing that changes is how we deliver it.
Odoo Online (SaaS)
You do not need the ability to install modules. A Millora consultant comes in with temporary access that you authorize and implements it with Odoo Studio. When they are done, you revoke the access.
Odoo.sh or your own server
You receive the module and the installation guide by email as soon as payment clears. Install it yourself, or we install it with you.
Installation · shell
# 1 · copia el módulo a tu addons_path
cp -r millora_recompra /mnt/extra-addons/
# 2 · reinicia y actualiza la lista de apps
odoo-bin -u all -d tu_base --stop-after-init
# 3 · instala desde Apps
# busca "Repurchasing"What it solves
The problem
Odoo's reordering rules are reactive: when stock drops below the minimum, it tells you. That works if your supplier is three days away.
If you import, it doesn't. Between placing the order, consolidating the container, sailing, arriving, clearing customs and reaching the warehouse, two or three months can pass. By the time the system warns you that you hit the minimum, what you order today lands in March. The warning was late by definition.
The question an importer needs answered is not "am I out?" but "will this cover the next four months, counting what is already on the water?". And that arithmetic — stock, plus what is shipping, minus what sells each month, product by product — ends up being a spreadsheet somebody rebuilds and nobody fully trusts.
How it works
Repurchasing runs that arithmetic every day, across the whole catalogue.
It starts from each product's average sales, computed over a window of days you configure — a business with sharp seasonality is not the same as one with level demand. It takes current stock, adds what is in transit from purchases already placed, and projects month by month ahead: four months as standard, the horizon a typical importer works with, adjustable if your cycle runs longer.
The result is a table where each product shows its stock declining month over month, and the month it hits zero is flagged. That is the figure that triggers the decision: not "you're low", but "you run out in month three, and your supplier takes two".
For products that won't make it, it computes how much to order: whatever is missing to cover the horizon, plus a 20% safety margin. A suggestion, not an order.
Beside each line sit the two facts you look for right before deciding: units sold per year, to tell real turnover from an average inflated by one good month, and the last supplier the product was bought from, so you don't go digging through history.
What's on the water
This is the piece that changes everything, and the one a homemade calculation usually gets wrong. If you don't count what is already bought and not yet arrived, the projection overstates the shortfall and ends up suggesting you buy what is already on the ship.
As it stands today, that figure comes from the Containers development, with the macro and micro order structure used for consolidated imports. If you don't consolidate containers, it is adapted to read transit straight from purchase orders, which is the ordinary route in Odoo.
What it does not do
It does not buy. It creates no purchase orders and places nothing with suppliers: it hands over the analysis and the suggestion, and the decision stays with whoever buys. That is deliberate — in importing, a wrong order isn't cancelled, it's received.
It does not guess seasonality. It projects on the average over the window you configure. If your December sells triple, the average doesn't know: adjust the window or read the yearly sales column.
And it is only as good as your data: if sales aren't recorded up to date or transit isn't captured, the projection will show it.
What changes
Purchasing stops being decided by feel and by urgency. Instead of reacting when the warehouse says there's none left, a list opens every week with the products that will run short in three months and how much to order of each.
For an importer, that is the difference between paying emergency air freight and putting it in the container that was leaving anyway.
What's included
- Projects stock month by month over a four-month horizon, adjustable
- Flags the month each product runs out
- Adds goods already in transit from placed purchase orders to the projection
- Suggests how much to reorder, with a 20% safety margin over the shortfall
- Computes average sales over the window of days you configure
- Shows units sold per year, to tell real turnover from one good month
- Names the last supplier each product was bought from
- Recalculates itself daily, at an adjustable frequency
- Reads consolidated imports with their macro and micro purchase order structure
Requirements
- Inventory, Sales and Purchase modules active
- Sales history recorded in Odoo: it is the basis of the average the projection runs on
- Purchases entered with their arrival date, so transit enters the projection
- Today it reads transit from the Containers development. If you don't run consolidated imports, it is adapted to standard purchase orders at implementation
You might also need
Containers
You know what each unit cost you before the ship docks
Inventory & warehouse
Valued Inventory Report
What your stock is worth, lot by lot, today or on the date you ask for
Inventory & warehouse
Negative Stock Control
No stock, no movement
Inventory & warehouse

