Modelling a pharma distributor in Odoo 17
By Hifsul · 2026-11-15 · 2 min read
A pharma distributor in Kozhikode was running its business on billing software plus a set of monthly spreadsheets. The owner and the field reps were never looking at the same numbers. I built a custom Odoo 17 suite so purchase, stock, sales, GST and profit live in one system. These are the decisions that mattered most.
Three prices on every product
Pharma products carry three prices: PTS for stockists, PTR for retailers and MRP for consumers. Rather than asking staff to pick the right one, each customer belongs to a price channel and the correct price is applied automatically. Fewer choices at billing time means fewer mistakes.
Batches leave first-expiry-first
Invoices pick stock batches by expiry date, first expiring first out. The printed GST tax invoice carries HSN code, batch and expiry for every line, along with the PTR, PTS and MRP. Near-expiry and low-stock reports sit on top of the same data.
Field reps see what they need, nothing more
Reps get a self-service view of their own customers, doctors, targets and visits. Cost and PTS prices are hidden from them with record rules, which are enforced by the server rather than by hiding fields in the interface. The owner, meanwhile, gets a live dashboard and a compilation report that pivots sales by brand, rep, area, channel and month.
Imports must be safe to run twice
Historic data arrived as monthly spreadsheets. The import runs over XML-RPC and is idempotent: running it again updates records instead of duplicating them. That single property removes most of the fear around data migration, because a failed or partial run can simply be repeated.
Reports are part of the product
For a distributor, reports are the product: GSTR-1 export, ledgers, P&L, distributor closing stock and stock-and-sales statements. They were built as proper wizards and QWeb reports, not as exports to be fixed in a spreadsheet later. The system is live at app.balotpharma.com.