Odoo 19 + Cloudflare

Inventory overhaul: one warehouse per site store and a clean item master

Site stores turned into warehouses of their own, so forecast, incoming stock and replenishment answer per project, and their movements priced for the accountant. Then the catalogue behind them: 8,190 items cleaned into 1,681 Odoo products with 8,010 variants, checked on the phone by the storekeepers, foremen and engineers who order them, and nothing reaches Odoo before the admin approves it.

  • 13site warehouses
  • 0quantities changed
  • 8,190old items
  • 1,681products to review

The problem

Each site store was a location inside the one warehouse of its company. Odoo answers forecast, incoming stock, a purchase order’s Deliver To and replenishment per warehouse, so the forecast for cement showed 149 units on hand and no way to tell which site they were at.

The catalogue behind those stores had its own trouble. The group works in contracting, MEP, joinery and real estate, and had bought from one catalogue for years. Each purchase line had become an item of its own: 8,190 of them, with the same adhesive tape under dozens of names, sizes and pack counts written into the name, and services filed as goods.

A clean list made at a desk is still a guess. The storekeepers, foremen and engineers who order and receive these materials know which names are the same thing, and most of them have no Odoo account.

One warehouse per site store

One warehouse per site store. Odoo 19 always gives a new warehouse a fresh stock location and refuses a replenishment location beside another, so the tool creates the warehouse normally, re-parents the store’s existing location under it as its stock, repoints every operation type, route and reorder rule that named the new empty one, and removes it. No stock move or quantity is touched; cost stays per company, and project cost still comes from the analytic account on consumption.

The dry run performs the whole conversion, compares a snapshot of every store, product and lot before and after, and rolls back. It was proven on a local copy first: a purchase received on its site, a reorder rule buying for its own site’s quantity, consumption and a site-to-site transfer, and a second run that changed nothing. Two old transfers still reserving stock in an empty store were cancelled first, so it could be archived.

Stock valuation for the books

The stores also had to reach the accounts. Every company values stock periodically and almost no product had a standard cost, so a read-only report first showed what each movement would post: receipts to site inventory against goods received not invoiced, consumption to the category’s expense with the project’s analytic account, no entry for a transfer between sites, and stock moving between companies through a transit account.

Cost is the last confirmed purchase price, then the standard price; a line with neither is flagged, never posted at zero. The choice was draft entries in Odoo for the accountant to review: 28 of them, one per company and month, in an Inventory Valuation journal, with the open questions written down beside them.

A clean item master, checked on site

The review site's catalogue filtered to the Pipe Fittings section: a filter panel on the left with quick filters, product type, usage and trade, and product cards with photos and variant counts.
The catalogue filtered to one work section. Usage, trade and section are set from the item names, because the old categories could not be trusted.

The clean-up

Sixteen rounds over the export of the old database, each one a plan file checked before anything was written. One template per kind of item: every elbow under Elbow, every adhesive tape under Tape, with the kind in a Type attribute and size, material, colour, brand and pack as attributes. Services were split from goods, and property units kept as products of their own. Similar names went to the owner as yes or no lists before they were merged. Older versions were archived, never deleted, and every variant keeps the old item names it replaced.

An item on the review site laid out like the Odoo product form: product name Tape with its photo, product type Goods, category picked from a list with a field under it for a new one, usage, trade, section and unit of measure.
An item as the field team sees it, laid out like the Odoo product form. A category is picked from the existing ones, or written under the list when it is missing.

The review site

A Cloudflare Worker serves the API and the front end, and D1 holds the items, users, suggestions and photos. The front end is plain ES modules with no build step and no framework, in Arabic and English with a right-to-left layout, made for a phone on site.

A reviewer can change the name, type, category, usage, trade, section or unit, change attribute values, add a photo, tick variants that belong to another item, select items that are the same and propose a merge, or mark an item reviewed with nothing to change. A bar on every page reminds them that what they send carries their name.

The Attributes and Variants tab of the Tape item: attribute lines for width, colour, brand, type and pack with their values, and below them the variant list with the old item names of each variant.
Attributes and variants. Each variant shows the old item names it came from, so a storekeeper recognises what they ordered.

Two people editing the same item do not overwrite each other. Every item carries a revision; a save made on an old one is refused, and the second person is told who changed it first.

Approval, then Odoo

Nothing a reviewer sends changes the catalogue by itself. The admin sees each suggestion as before and after, with the reviewer’s reason, and approves or rejects it with a note back. Approved suggestions are exported with the employee behind each one; a script run inside Odoo applies them and posts every suggestion in the product’s chatter, linked to that employee, so the history stays with the product.

The admin's suggestion queue: a pending suggestion from a demo user renaming 2 UV LAMP to UV Lamp, with the reason, a note field and Approve and Reject buttons.
The admin’s queue: what changes, why, and one click to approve or reject.

Access and help

The site shows nothing before sign-in, and only the admin makes accounts. Passwords are hashed with PBKDF2-SHA256, the session is an HttpOnly, SameSite=Strict cookie, every write needs a same-origin header, and sign-in attempts are limited per address and username.

A help assistant answers 24 ready questions about the site in both languages, with no AI call behind it; the questions it cannot answer are kept for the admin. A WhatsApp button reaches the admin for a question or a complaint.

The catalogue on a phone: search box, filters button, the active section chip and product cards. An item on a phone: the Tape product with its photo and the fields stacked in one column.
On a phone, where most of the reviewing happens.

The result

Live on production: 13 warehouses, 5 empty stores archived, and not one quantity or movement changed (on staging, 1,897 quantity lines and 10,298 movement lines were compared before and after). Forecast, incoming and replenishment now answer per site.

8,901 store movements priced into 28 draft journal entries, with 1,298 stock lines flagged as having no cost for purchasing to price.

The review site is live on Cloudflare for the team: 1,681 products with 8,010 variants, 820 photos, and 62 work sections across 18 trades for the filters. Each person’s count of suggestions shows on a team page, so the admin sees who is reviewing. 35 API checks cover sign-in, rights, conflicts and every kind of suggestion.

A 10-page user guide in Arabic and English comes with it, built from screenshots of a local copy. The screenshots here come from that copy too, signed in as a demo user.