Skip to Content
MAFA Group · Odoo 17

A multi-day VAT exercise became a button

Every posted invoice, bill and reversal in the period, claimed automatically — and locked to that one batch.

Led by Umar · Excel layer by Yaseen
Odoo 17 Python XlsxWriter

The problem a client brought us

“Filing our VAT return means an accountant manually pulling every invoice and bill for the period into a spreadsheet. It takes days, and it's one missed row away from being wrong.”

Before and after

Pulled into a spreadsheet by hand

  • Invoices
  • Vendor bills
  • Reversals
  • The date window

Claimed once, locked to one period

One batch per document

What we found and built

A batch engine that claims every posted invoice, bill, and reversal in a date window automatically — and locks each document to that one batch, so the same document can never be filed twice across two periods.

  • Taxable/untaxable base split automatically, reversals subtracted rather than trusted on sign alone
  • Multi-tab Excel export laid out exactly as the official return form

Result

A multi-day spreadsheet exercise became a button.

The pattern behind it

Enforce the rule where it can't be walked around

A rule that only lives on a screen can be bypassed by an import, a script or a busy person. We put it in the model: constraints, gates on stage changes, access checks on every data path.

How we think about problems

Recognise any of this?

Most of our work starts with a message that sounds a lot like this one did.