Oil and grease on Dynamics 365 — digitising fluid physics

In a lubricants plant, a litre is not always a litre.
Oil expands with heat and contracts with cold. Base oil arrives at a different specification in every shipment. A gram of additive in the wrong direction condemns a batch worth more than the equipment that mixed it.
None of that fits the accounting model most ERP systems are built on, which assumes a unit is a unit and that what you counted in June counts the same in December.
This is an account of an implementation where the difficulty was not the software. It was translating chemistry and physics into something a ledger could hold.
The diagnosis: the answer is not in the office
The first walk-through produced the usual meeting — the production manager defending his crew, the accountant holding spreadsheets that showed a shortfall, the general manager waiting to be told where the money was going.
The meeting produced nothing. The tank farm produced everything.
The plant had no programmed strapping tables. An operator dropped a dip tape, read 150 centimetres, and converted that to litres using a laminated sheet on the wall — with no correction for temperature and no density adjustment.
One millimetre of reading error, across a tank of that diameter, is hundreds of litres. Multiplied across twenty-eight tanks and read twice a day, that is the entire unexplained loss the accountant had been chasing, and it was never theft. It was arithmetic.
The platform question, asked in the room
Halfway through, a manager asked the question every buyer asks: why pay for Dynamics when Odoo costs a fraction of it?
It is a fair question and it has a specific answer here, which does not generalise.
This is process manufacturing, not discrete. In discrete manufacturing you assemble components: three legs, one seat, one chair. The quantities are fixed and the output is countable. In process manufacturing the recipe changes with the input — because the additive that arrived today is 92% concentration rather than the 100% the formula assumed, and the batch has to be recomputed before it is mixed.
| Discrete | Process | |
|---|---|---|
| Input | Countable parts | Variable-strength materials |
| Recipe | Fixed | Recomputed per batch |
| Output | Units | Yield, plus by-products |
| Stock measure | Each | Weight and volume, at a temperature |
Odoo is genuinely strong on the left column. Reaching the right column in Odoo means building batch balancing, catch weight and active-ingredient handling as custom code — which is possible, and which produces a system whose most important logic exists only in the head of whoever wrote it.
Dynamics 365 Supply Chain Management ships the right column. That was the argument, and it was an argument about this plant rather than about the products in general. The full comparison, without a project attached to it, is in ERP systems — and the guides for Odoo, Dynamics 365 Business Central and SAP S/4HANA set out where each one actually fits.
What was built
Dual unit of measure
Every item has two lives. It is purchased and stored by weight, because weight does not change with temperature and the financial value has to be stable. It is produced and sold by volume or by pack, because that is how the plant and the customer think.
The conversion runs on the specific gravity recorded for each batch, not on a global constant. A ten-tonne receipt becomes a litre figure that is true for that shipment, rather than true on average.
Batch balancing
The formula distinguishes two kinds of ingredient:
- Active — the additives whose potency varies between deliveries.
- Compensating — usually the base oil, which moves up or down automatically to absorb the variance and keep the batch at its target volume.
Select the batch number of the raw material and the system reads its quality attributes and recomputes the production order. The chemist stops doing the arithmetic, and the arithmetic stops being wrong.
Flush oil as a by-product, not as waste
Switching a line from heavy gear oil to light hydraulic oil requires flushing with base oil. Historically that oil was written off — its cost stayed in the batch that produced it and its volume disappeared.
Defining the flush as a by-product changed two things at once. The recovered volume is entered after every changeover, its value is deducted from the main batch cost, and it enters stock as a saleable item for heavy-industry fuel.
The result is a profit and loss statement that reaches down to the individual changeover.
Catch weight, tied to the weighbridge
The weighbridge feeds the system directly. The system receives tonnes and applies the density factor for the recorded temperature to derive the true volume.
Summer and winter stop producing different answers for the same tank.
The laboratory as a gate, not a sticker
The laboratory had been operating on its own — results written on a sticker attached to the tank.
It became the lock. A business event notifies the lab when a batch finishes mixing. The chemist enters viscosity and flash point. If the results pass, the system releases the stock to the filling line. If they fail, the batch is quarantined and no operator in the plant can issue it, regardless of who asks.
This is the change with the largest control effect and the least code.
The cutover: 48 hours, 28 tanks
Cutover in a fluids plant is not a data load. It is a physical inventory of millions of litres, taken while everything is switched off.
Thursday 18:00 — movement freeze. Pumps stopped, filling lines silent, receiving trucks turned away at the gate.
The problem nobody plans for is the oil in the pipes between the tanks and the filter. It is real stock and it is in no countable location. The answer was to purge the lines back into their tanks, so that every litre in the plant sat in exactly one measurable place.
Then the count. Height in centimetres and temperature, entered on handhelds. For each reading the system applied the strapping table for that specific tank, applied the volume correction factor for the recorded temperature, and converted to a costed weight.
Six hours, against two days under the old method — and with a reconciliation the plant had never previously achieved.
Sunday 08:00 — go-live. The first base oil tanker onto the weighbridge. One press: gross weight read, tare deducted, sampling notice raised to the laboratory, goods receipt issued. Under the old process the driver waited hours for a handwritten document.
What changed, measured six months on
| The measure | The result |
|---|---|
| Yield loss | Down 12%, from flush oil recovery and evaporation control |
| Cost accuracy per litre | 99.5% |
| Certificate of analysis | Issued automatically with the invoice |
| Energy, water and chemical waste | Down 15% |
The third row opened markets. European buyers require traceability documentation that the plant previously could not produce inside a shipping window, so it had not tendered for that work.
And the fourth row was not an environmental programme. It is the same batch balancing, counted differently: a batch rejected on a chemistry error is chemical waste, wasted energy and a disposal cost. Precision and sustainability turned out to be the same project with two reporting lines.
The financial half nobody discusses
Base oil is a traded commodity. It moves with every piece of global news.
The exposure that kills margins is not the price; it is not knowing the price you actually paid. Buy today, produce tomorrow, sell next week — and the question of whether you made money is unanswerable until the period closes, by which time the quotations are already out.
Two mechanisms fixed it:
- Moving or weighted average valuation applied continuously, including landed cost, so the cost per litre is current rather than retrospective.
- Purchase price variance monitored between the expected and actual purchase price, so a divergence is visible on the day it happens.
A finance director who can see the true margin during a price swing is making decisions. One who waits for the close is reacting to them.
What generalises from this
Very little of the above is about Dynamics 365 and most of it is about a question asked at the start: does this system understand what my product physically is?
A plant that assembles parts and a plant that mixes fluids need different answers, and the second group is routinely sold the first group’s software. The cost of that mistake is not visible in year one, because the custom code works. It is visible in year three, when the person who wrote it has left.
Before selecting anything for a process plant, read how to run a demo that tells you something, and the failures that recur across implementations. The cycle underneath all of it — receipt, issue, valuation, close — is in the inventory cycle and the financial cycle.
About the author
Ahmed Hassan Algammal
ERP implementation consultant. More than 60 deliveries across the UAE, Saudi Arabia and Egypt in manufacturing, contracting and distribution.
Book a call →