Odoo integration

Connect Odoo to FBR digital invoicing

For businesses on Odoo Invoicing or Accounting, whether on Odoo Online, Odoo.sh or their own server. Send every customer invoice to FBR the moment you confirm it, without rebuilding your accounts in a custom FBR module.

Updated

eInvoicePro API documentation, where Odoo sends confirmed invoices on their way to FBR

How it works

When an Odoo invoice goes to FBR

Every Odoo invoice starts as a draft. The moment you confirm it, it becomes part of your accounts. That is the moment FBR cares about.

In Odoo, a customer invoice starts as a draft that you can change freely. When someone confirms it, Odoo posts it. The invoice gets its final number from the journal’s sequence, its lines and taxes are locked, and it becomes part of your accounts. FBR wants each invoice sent as soon as it is created. For an Odoo business, “created” means that confirmation.

A good integration starts at that moment and does five things for every confirmed customer invoice:

  1. Spot the confirmed invoice: through code inside Odoo that runs on confirmation, an automation rule that sends the invoice out, or a service that asks Odoo for new invoices every few minutes.
  2. Put it in FBR’s format: Odoo’s taxes become FBR sale types and rates, products get HS codes and FBR units, and customers get a registration type and province.
  3. Send it to FBR through eInvoicePro’s API. Odoo’s own invoice ID goes with it, so if the connection drops and the invoice is resent, it is never filed twice.
  4. Read FBR’s answer line by line. If one line is rejected, the whole invoice is not filed, even when every other line is fine.
  5. Save the result in Odoo. The FBR number, status and QR data go onto the Odoo invoice. Your team can see them, and they print on the PDF.

Don’t make confirmation wait for FBR

It is tempting to call FBR during confirmation and block the invoice if FBR says no. But then your accountants wait on FBR every time, and if the connection drops, Odoo is left half-way through saving. Instead, confirm the invoice as normal and send it to FBR straight after. Show a clear status on the invoice (filed, failed, waiting). A rejected invoice then gets fixed within minutes, and the person who raised it is never blocked.

What changes once FBR has the invoice

Once FBR returns a number, FBR’s copy is the one that counts. Odoo still lets an accountant reset a confirmed invoice to draft and change it. But FBR’s copy stays exactly as it was, because no API call can edit or cancel a filed invoice. If there is a real mistake, it is fixed by hand on FBR’s side within three days of the invoice. After that, it needs the Commissioner’s permission. A good link marks filed invoices clearly, so nobody “fixes” one in Odoo and thinks FBR’s copy changed too.

You don’t need Odoo Enterprise, a particular Odoo version or a new chart of accounts. You need your invoices, taxes, products and customers, and a decision on where the link runs.

Your options

Where your Odoo runs decides the route

The same link can sit inside Odoo or run beside it. Which one you can use depends mainly on where your Odoo is hosted.

Odoo Online

Odoo’s standard cloud does not accept custom modules, so the link runs beside Odoo. From Odoo 17, an automation rule can send each invoice to a web address when it is saved. Reading invoices and saving the FBR number back both go through Odoo’s external API.

Watch: on Odoo Online, API access comes only with Odoo’s Custom plan. Make sure your plan includes it.

Odoo.sh

Odoo’s platform for customised databases. A custom module from your own code repository can run the moment an invoice is confirmed and save the FBR number on the invoice. You also get a staging branch, a copy of your database for testing.

Watch: test on the staging branch with FBR’s test system (the sandbox) before anything touches your live database.

Your own server or a partner’s

Full control: a module inside Odoo or a service beside it both work. The only need is that your server can make outgoing HTTPS calls to eInvoicePro.

Watch: on older or heavily customised Odoo, test the step that runs on confirmation on your own version, not just the one in Odoo’s documentation.

Edition and version details that matter

Community or Enterprise makes no difference here. Both have the same external API and the same invoice records. Two version details do matter. On Odoo 19 or later, build on Odoo’s newer JSON-2 API. The older XML-RPC and JSON-RPC APIs are due to be removed in Odoo 22. And from Odoo 15, Odoo includes a Pakistan localization with a Pakistani chart of accounts and sales tax set-up. It gives you a good starting list of taxes to match to FBR, but no FBR e-invoicing connection.

Two things matter more than edition: how many companies you run in one database, and whether invoices go through one journal or several. Both come up in the traps below.

The data

FBR’s fields, and where to find them in Odoo

Most of what FBR needs is already in Odoo. The gaps are the same as in every accounting system: sale type, HS code, FBR’s names for units and the buyer’s registration type.

FBR invoice fields and where each one comes from in Odoo
What FBR asks for Where it comes from in Odoo What to watch
Your NTN or CNIC and province Your company record: its tax ID and address Digits only; the province must be one of FBR’s, not a city
Buyer NTN or CNIC The customer’s tax ID field Blank for many walk-in or retail customers, so decide how you handle unregistered buyers
Buyer registration type Not a standard Odoo field Add a customer field and fill it by checking each number with FBR
Buyer province The customer’s address state Match Odoo’s states to FBR’s province names once
Invoice number The journal sequence, such as INV/2026/00042 FBR accepts only letters, digits and hyphens, so the slashes must be changed
Document type Customer invoice or credit note Notes follow FBR’s own rules and must quote the original FBR invoice number
HS code Products get an HS Code field when Odoo’s shipping apps are installed; otherwise there is none Fill it for each product (or by product category) from FBR’s own list, and store it as text
Unit of measure The product’s unit, such as Units or kg Change it to FBR’s wording; the units FBR accepts depend on the HS code
Sale type, rate and SRO The taxes on each invoice line Match each Odoo tax to an FBR sale type; take the rate from FBR’s own rate list
Value excluding tax, and sales tax The line subtotal and tax amounts Odoo has already worked out If prices include tax, take the tax out so FBR gets the value before tax
Discount The line discount Don’t apply it twice when the value already has the discount taken off

Odoo’s taxes are the key to all of this matching. Our article on matching tax codes to FBR sale types shows how to turn each one into what FBR checks.

Build or buy

Build a full FBR module inside Odoo, or link Odoo to eInvoicePro

Odoo is open, so building your own all-in-one FBR module is tempting. The real question is who keeps it working when FBR changes something.

Build it all in Odoo

Your own module that talks to FBR directly

  • Your developer handles FBR’s invoice data, login tokens, resending failures and reading errors line by line, all inside Odoo
  • Every FBR technical change means updating, re-testing and reinstalling the module
  • FBR has no duplicate protection, so safe resending has to be built from scratch
  • You build the NTN/CNIC checks and FBR’s lists of HS codes, units and rates yourself
  • A second Odoo database, or sales outside Odoo, means doing it all again
Ready service

Odoo → eInvoicePro → FBR

  • The link only converts Odoo’s data and makes one API call per invoice or batch
  • When FBR changes its technical rules, eInvoicePro is updated and your Odoo code stays as it is
  • Duplicate protection, resending of single failed invoices and FBR’s full replies come built in
  • HS code, unit, rate and SRO lists let you check your matching against FBR’s own data
  • Each Odoo company files under its own NTN, all from a single eInvoicePro account

Using Odoo? Book a demo

See how eInvoicePro sends invoices to FBR, and ask us anything about connecting it to Odoo.

Watch these

Odoo traps to avoid

Each of these looks fine in a quick demo, then fails in the first month of real invoices.

Numbers and documents

  • FBR rejects invoice numbers with slashes, such as INV/2026/00042, unless you change them
  • Several sales journals mean several number series, but every invoice number you send to FBR must still be unique
  • A credit note needs the original invoice’s FBR number, not just its Odoo reference
  • Resetting a filed invoice to draft in Odoo changes nothing at FBR

Taxes

  • When prices include tax, the value before tax that FBR needs on each line is hidden
  • Fiscal positions change taxes per customer, so the same product can reach FBR under a different sale type
  • Two Odoo taxes on one line, such as sales tax and further tax, go in separate FBR fields
  • One “GST 18%” tax used for everything cannot show reduced-rate or exempt lines

Companies and scope

  • In a database with several companies, each one has its own NTN and its own FBR credentials
  • Invoices between your own companies need a clear rule, because FBR won’t accept an invoice where buyer and seller share an NTN
  • Walk-in or retail customers without a tax ID need an agreed rule for unregistered buyers
  • Most services fall under a provincial authority, not FBR

Selling services? Check this first

Most service income is a provincial matter. FBR’s scheme covers goods, federal excise duty charged in sales tax mode, and services supplied in Islamabad Capital Territory, not services in general. If you sell services in Punjab or Sindh, read our guides to PRA E-IMS and SRB POS before you build anything.

Going live

A realistic four-week plan

Connecting the API is quick. The weeks go on matching taxes and products to FBR, and proving it all works in FBR’s test system.

  1. Week 1

    Match taxes, products and customers

    List every tax used on customer invoices and give each one an FBR sale type. Add HS codes and FBR units to products, by product category where you can. Fill in tax IDs, registration types and provinces for the customers you invoice most.

  2. Weeks 2–3

    Build the link and test it with FBR

    Connect the link to eInvoicePro with test mode switched on (same address and key, only the test switch changes). Then run real Odoo invoices through the test cases FBR has given your business. On Odoo.sh or your own server, do this on a test copy of the database.

  3. Week 4

    Run both side by side

    For one week, FBR checks every confirmed invoice without filing it, while your team works as usual. Compare the daily totals with Odoo’s sales reports. New products and new customers are where the gaps show up.

  4. Go live

    Send every invoice as you confirm it

    Switch to live filing. Print the FBR number and QR code on the invoice. For the first few weeks, make one person responsible for the list of failed invoices.

Finance

Decides which FBR sale type each tax gets, approves test invoices, and fixes customer details when a buyer is rejected.

Odoo developer or partner

Builds the link for your hosting, adds fields for HS code, registration type and FBR number, and updates the invoice PDF to print them.

eInvoicePro

Checks every invoice against FBR’s lists, sends it to FBR and returns FBR’s invoice number and QR data for the Odoo invoice. Our team helps you set it up.

FAQ

Frequently Asked Questions

Still have a question?

Ask our team on WhatsApp. Tell us what you sell and where, and we will point you to the right setup.

Ask on WhatsApp
Can Odoo send invoices to FBR on its own?

No. Odoo has no built-in FBR connection. A small link passes each confirmed invoice to eInvoicePro. eInvoicePro checks it against FBR’s rules, sends it to FBR and hands back the FBR invoice number.

Does it work with Odoo Community as well as Enterprise?

Yes. Both editions have the same external API and invoice records, and that is all the integration needs. Your hosting and plan matter more than your edition. On Odoo Online, the link runs beside Odoo. On Odoo.sh or your own server, it can also be a custom module.

We use Odoo Online. Can we still integrate?

Yes, with one condition. Odoo Online does not accept custom modules, so the link runs outside Odoo. It reads and updates invoices through Odoo’s external API, and on Odoo Online that API comes only with Odoo’s Custom plan. From Odoo 17, an automation rule can also alert the link the moment an invoice is saved.

Doesn’t Odoo’s Pakistan localization already handle FBR?

No. Odoo’s Pakistan localization, available from version 15, gives you a Pakistani chart of accounts, sales tax set-up and tax reports. It does not connect to FBR or create FBR digital invoices. But its taxes are a good starting point when you match them to FBR sale types.

How do we print the FBR number and QR code on the Odoo invoice?

Save the FBR number on the invoice, then change the invoice print template to show it with the QR code. On Odoo.sh or your own server, that is a small module. On Odoo Online, how much of the print template you can change depends on your plan.

We run several companies in one Odoo database. Is that several integrations?

No, it is one integration with settings for each company. Each company has its own NTN and FBR credentials, and one eInvoicePro account can hold the credentials for several sellers. A single batch can even mix invoices from different companies.

Should we buy an FBR module instead?

If you look at one, from anyone, ask four questions. Who updates it when FBR changes its technical rules? How does it avoid filing an invoice twice when FBR’s reply is lost? Does it read rejections line by line? Where does it keep a copy of the invoice data it sent? Those four answers show whether it is just a demo or something you can run for six years.

Can we correct or cancel an FBR invoice from Odoo?

Only on FBR’s side. No API call can cancel or edit a filed invoice. A real mistake is corrected directly in FBR’s system within 72 hours. After that, it needs the Commissioner’s approval. Resetting the invoice to draft in Odoo leaves FBR’s copy untouched.

Does the integration cost qualify for the section 64D tax credit?

Yes, if your business is required to integrate. Section 64D gives a credit of 10% of what you invest in the electronic resources used to connect to FBR. One-off spending on building the link counts. Regular subscription fees don’t.

Ready to simplify your FBR digital invoicing?

Join 2000+ businesses that use eInvoicePro to make invoices and send them to FBR.

Chat with us