Odoo for coffee roasting in Morocco: from green bean to invoice
A roaster does not simply sell coffee. It buys green beans by the lot, blends them according to recipes it never wants to see drift, roasts them, delivers them to customers who expect consistency, then invoices and pays its sales reps on commission. Every step produces information. When that information lives in five Excel files and a notebook, the simplest question turns into an investigation.
We built this cycle end to end for AKKA Products Food, a coffee roaster and distributor in Tangier. This article describes what we put in place, step by step, and what it changes in the daily life of a Moroccan food-processing SME.
Why a roaster quickly outgrows Excel
As long as you roast a single blend for a handful of customers, a spreadsheet is enough. The limits appear as soon as the business gets structured:
- Lots. Green coffee arrives in several deliveries, from different origins and on different dates. Without a lot number, there is no way to know which sack ended up in which blend.
- Blends. A blend recipe is a promise made to the customer. If the dosage changes depending on who is roasting, the taste changes too.
- Yield. Coffee loses weight during roasting. Without tracking quantities in and out, you do not know your real margin.
- Commissions. Working out by hand what each sales rep is owed, accounting for credit notes and negotiated rates, takes hours and breeds disputes.
What they share: the same information is re-keyed at every step, with the risk of error that comes with it. The goal of the project was simple to state: a single data entry, end to end.
The full cycle in five steps
The deployment runs on Odoo 18 Community, completed by a custom-developed module. Here is the thread, from buying the bean to the commission.
1. Buy the green coffee
Everything starts with a supplier purchase order: negotiated price, quantity in kilograms. The document carries the supplier's ICE, which is required for VAT to be deductible. No more retyping or checking it by hand: it follows the supplier record.
2. Receive and trace
On every arrival of goods, a lot number is assigned. We use a format everyone in the workshop can read, for example LOT-AC-2608-A: Arabica Colombia, August 2026, first delivery. Stock and stock valuation update automatically, at the price actually paid, not at an estimated average.
3. Roast by recipe
The manufacturing order loads the blend's frozen recipe, that is, the Odoo bill of materials. If you ask for 150 kg of a blend defined for 100 kg, each ingredient is multiplied by 1.5. No mental math, no dosing error.
Green coffees are consumed lot by lot, and the roasted blend enters stock under its own roasting lot, for example TOR-2608-OR1. That number links the finished product to every green-coffee lot that went into it.
4. Sell and deliver
The sales chain follows the classic path: quote, order, delivery note. The detail that matters: the delivery note carries the delivered lot number. Traceability therefore does not stop at the warehouse door; it follows the goods to the customer.
5. Invoice and calculate the commission
The invoice takes over the order, with no re-entry. It is issued in dirhams, with Moroccan VAT rates (20, 14, 10 and 7 %), on custom PDF documents that show the company's legal mentions: ICE, IF, RC, Patente and CNSS. The Moroccan chart of accounts (l10n_ma) is configured from the start so that accounting produces compliant entries.
The salesperson's commission follows the document: its rate is picked up automatically and remains adjustable invoice by invoice. It then feeds a monthly sales-rep statement.
Traceability: from customer to sack, and back
This is the most concrete consequence of the chain of lot numbers. In a few clicks, you can go back from a customer to the original green-coffee sack, and the other way round, from a sack of green coffee to every customer who received some of it.
Take a case: a defect is spotted in one delivery of green coffee. Without traceability, the only prudent reaction is a blanket recall, costly for both image and cash flow. With lots:
- You open the green-coffee lot concerned.
- Odoo shows which roasting lots it was used in.
- It then shows which delivery notes carry those lots, and therefore which customers are affected.
Only the customers actually concerned are contacted. The others never hear about the problem. For a roaster working with hotels, cafés and resellers, that precision changes the nature of the trust relationship.
Commissions calculated on what is invoiced, not what is ordered
Many companies pay their sales reps on orders, then find that some were never delivered, were partly cancelled, or are the subject of a credit note. We chose the opposite rule: commission is calculated on what is invoiced, not on what is ordered. A credit note is deducted.
The commission rate follows the document and can be changed on each invoice when a particular negotiation calls for it. This data feeds a monthly statement per sales rep. Each rep sees only their own figures there: they can check their statement without access to their colleagues', and management no longer has to arbitrate calculation gaps.
What is standard Odoo, and what is custom-developed
It is important to be clear on this point, because it determines the scale of a project.
Standard Odoo modules, configured for the trade:
- Manufacturing (manufacturing orders, bills of materials)
- Inventory (lots, stock valuation)
- Purchase
- Sales
- Accounting, with the Moroccan chart of accounts l10n_ma
Custom-developed:
- the Moroccan PDF documents (quotes, delivery notes, invoices) with the company's legal mentions;
- the legal fields needed, such as the supplier's or customer's ICE;
- the monthly sales-rep statement, with its per-user partitioning.
This split is the right approach: we lean as much as possible on the robustness of the standard, and we only develop what the Moroccan context or the trade truly requires. Less custom code means less technical debt and simpler updates.
Who else does this fit?
The logic is not specific to coffee. Any Moroccan food business working with blends, recipes and lots will recognise the same needs: spices, tea, dried fruit, herbs, products packed from raw materials bought by the lot. Wherever a finished product comes from several traced ingredients, the purchase, lot, recipe, delivery, invoice pattern carries over almost as is. Only the documents and some business rules change.
This project is listed in our portfolio.
Considering the same cycle for your business
If you buy raw materials by the lot, process them according to recipes and need to prove where each delivered product came from, we can start from this cycle and adapt it to your workshop. Discover our Odoo ERP service, or read our complete guide first: Odoo for SMEs in Morocco, which covers the deployment steps and the selection criteria.
Frequently asked questions
Is Odoo suitable for a small roastery? Yes. The cycle described here relies on standard modules (manufacturing, inventory, purchase, sales, accounting) and on the Community version. We start with the purchase, lot, roasting, delivery, invoice chain, then add the rest once the team uses it comfortably.
How does coffee lot traceability work in Odoo? Every arrival of green coffee receives a lot number. Every roast consumes those lots and creates its own finished-product lot. Every delivery note records the delivered lot. You can therefore go back from a customer to the original sack, or down from a sack to every customer concerned, in a few clicks.
What happens if a delivery of green coffee is defective? You open the lot concerned and look at the roasts and then the deliveries that used it. Only the affected customers are contacted. There is no need to recall your entire customer base as a precaution.
Are the invoices compliant with Moroccan requirements? They are issued in dirhams, with the Moroccan VAT rates of 20, 14, 10 and 7 %, on custom PDFs that show ICE, IF, RC, Patente and CNSS. The Moroccan chart of accounts l10n_ma is configured. The supplier's ICE also appears on purchase orders for VAT deductibility.
Can sales-rep commissions be calculated automatically? Yes. The rate follows the document and stays editable per invoice. The calculation is based on the invoiced amount, and a credit note is deducted. A monthly statement brings it all together, and each rep sees only their own figures.
We work with SMEs across Morocco, including in Mohammedia, Casablanca and Rabat.

