Odoo 19On the staging database; production install pending

AI product finder

Product search for a construction and MEP catalogue: describe a material in Arabic or English, or hand over a supplier quotation, and get the matching products from the existing catalogue, ranked and explained.

  • 85automated tests
  • 197trade terms seeded
  • 3matches per quotation line

The problem

A multi-company construction and MEP group buys from a catalogue whose product names are short specification strings, typed over years by different people, in Arabic and in English. Exact-word search misses what is already there, and a buyer cannot tell which of five similar names is the one in stock.

What I built

A conversational product search built into Odoo 19, delivered as a native module: OWL components in the web client, the ORM and PostgreSQL for retrieval, security groups and record rules for access, a configurable terminology model seeded with 197 trade terms, and an audit log with retention. Each user can switch it on or off from their own menu.

The AI architecture keeps the language model out of the database. A deterministic engine understands the request, retrieves a bounded set of candidates as the person asking, and scores them; the model only re-ranks that set through a strict JSON schema the server validates, so it can never invent a product or bypass a rule. There are no embeddings or vector store: names this short are better served by terms and sizes.

Document reading follows the same pattern for supplier quotations. A photo or a PDF becomes its lines in one extraction call, and each line gets its three closest products; a PDF with a text layer is read without any AI call at all.

Providers are an interface, not a dependency: Anthropic and Google Gemini today, another vendor tomorrow, with token use, timeouts and failure modes handled so the assistant always answers. A Test connection button says whether the key works and, when it does not, why.

The result

85 automated tests, including a headless Chrome tour of the screen. The database search stands on its own with no AI key; with one, Gemini’s free tier is the default.

Installed on the staging database. The production install is pending.