Skip to Content

228 wrong recipes: fixing pack barcodes for a Bahrain supermarket

Case study: Anwar Al Gallaf, Odoo
December 1, 2026 by
228 wrong recipes: fixing pack barcodes for a Bahrain supermarket
Jamshaid Hashmi
| No comments yet

Anwar Al Gallaf runs three supermarkets in Bahrain on Odoo. They sell most products three ways: a single, a pack and a carton. When they asked us to clean up how packs were scanned, we looked at the data first. We found 228 pack recipes taking the wrong quantity out of stock every time they were sold.

Why packs are hard

A carton of 32 is not a new product. It is 32 of the same product with a different barcode and a different price. The till has to know that, and so does the stock count.

Their system handled packs with kits. In Odoo a kit is a small recipe: sell the kit and Odoo deducts the items inside it (Odoo's guide to kits). That is fine for a gift box with different things in it. For a carton of one item, it means thousands of recipes that all have to be exactly right.

Audit results: 4,012 pack products set up as kits, 3,701 simple packs, 228 recipes deducting the wrong quantity

What we found

We only read the live database at this stage. Nothing was changed until the owners had seen the numbers.

  • 4,012 products were set up as kits across the three stores.
  • 3,701 of them were plain "N of one item" packs. They never needed a recipe.
  • 228 recipes deducted the wrong quantity. One 5-pack took 8 units off the shelf count every time a cashier scanned it.
  • Some cartons had been received onto the kit instead of the single item, so the same goods sat in stock in two places.
  • Recipes belonged to one store while the other stores received the goods, so the counts drifted further apart at each branch.

The cashiers were scanning correctly. The setup underneath them was wrong.

The fix

Patching 228 recipes would have left 3,700 more waiting to break. So we changed the model: every pack size becomes a barcode on the single product, with its own unit and price. Odoo supports the same idea through product packagings. Their Odoo already had a Barcodes tab on each product, so we used that.

Before: a kit recipe for every pack. After: one product with a barcode line for each pack size

We tested it on a dummy product first. A carton barcode was sold at the till and 32 units left stock. We refunded it and 32 came back.

The staff also asked for two buttons, so we added them: Generate Barcode for items that have none, and Add Pack Barcode, which asks for the pack unit and price and adds the line. A Print Barcode link on the same tab prints shelf labels straight from the product.

Night one

A supermarket can't stop trading for a system change, so we ran it at night, from 01:30 to 03:00, after every till session was closed.

Night one: 461 packs converted, 33,332 units moved, 23 pack units created

  • We took a full product backup before running anything.
  • 461 pack products moved to barcode lines and were live by the morning.
  • 87 duplicate stock records were merged, putting 33,332 units back on the right products.
  • We created 23 pack units, PAK-2 up to PAK-100, so every pack size has a proper unit.
  • A few odd cases went wrong. We rolled those back on the spot, fixed the script, and redid them the next night.

One detail caught us out: their system keeps every barcode unique across all three stores, in both directions. The script now checks every store before it creates a barcode.

If you run a shop on Odoo

  1. Pick ten fast-moving products and count them yourself. If the shelf and the system disagree, look at the setup before you blame the staff.
  2. Keep kits for real bundles. A carton of one item should be a barcode.
  3. Audit before you fix. A read-only report takes a day and saves weeks.
  4. Change live systems at night, in batches, with a backup and a way back.

Odoo's pages on product barcodes and GS1 barcodes are worth reading if you want to check your own setup.

Stock that doesn't add up?

We build and fix business systems for shops, schools and service companies in Bahrain, from Odoo ERP to point of sale. Send us a message and tell us what's not matching. We'll tell you where to look.

WhatsApp us: +973 3367 6007   Book a call

Sign in to leave a comment