HADOOPT
TECHNOLOGIES
Schedule a Tech Consultation
Home
Services
Odoo ERP implementation Rollout, custom modules, migration and support. Web application development SaaS products, portals and internal platforms. Mobile application development Offline-first field apps and customer apps. AI development & automation LLM assistants, document processing, forecasting. Odoo version upgrades ↗ Move to a newer release, scoped and priced on its own site.
Products
OrgExp ↗ Budget, CAPEX and OPEX management.
Blog About Contact Schedule a Tech Consultation
Blog / Odoo implementation
Implementation 8 min read

Fixing common e-invoice (IRN) and e-way bill errors in Odoo 19

What the common IRN and e-way bill portal errors mean (GSTIN, duplicate IRN, HSN, pin code, distance, cancellation) and where to fix each one in Odoo 19.

· ERP practice 12 Nov 2026

Almost every e-invoice or e-way bill error in Odoo 19 comes from master data: a wrong GSTIN, a missing or invalid HSN code, a pin code that doesn't match the state, or a distance the portal won't accept. Odoo shows the portal's error code and message on the invoice or e-way bill. You fix the contact, product or transport details, then send again. The one error you can't fix in Odoo is a missed cancellation window: an IRN can only be cancelled within 24 hours of generation, and after that you issue a credit note.

For the setup itself, see GST compliance in Odoo 19.

Where Odoo 19 shows e-invoice and e-way bill errors

For e-invoices (l10n_in_edi), a posted B2B, export, SEZ or deemed-export invoice gets the status To Send. When the portal rejects it, a red banner appears at the top of the invoice with each error as [code] message, and the status stays To Send. Fix the data and send again. The Indian E-Invoices To Send filter on the invoice list shows everything still waiting.

Before calling the portal, Odoo checks the seller and buyer contacts. It requires a street and a city of 3 to 100 characters, a state, a 6-digit pin code from 100000 to 999999, and a 2-digit state TIN on the state record. If any of these fail, the banner lists them and nothing is sent.

For e-way bills (l10n_in_ewaybill), the error is shown on the e-way bill record, opened from the invoice or the delivery. The status stays Pending. Fix the cause and click Generate e-Waybill again. In developer mode, both records can download the JSON that was sent.

Common portal error codes and where to fix them

Codes from the official lists on einvoice1.gst.gov.in and docs.ewaybillgst.gov.in, with the messages shortened.

CodePortal messageFix in Odoo
3028 (IRN)GSTIN -{0} is invalidCorrect the GSTIN on the customer contact.
3029 (IRN)GSTIN -{0} is inactive or cancelledCheck the GSTIN's status on the contact; confirm with the customer.
2150 (IRN)Duplicate IRNUsually none. Odoo fetches the existing IRN (see below).
2176 (IRN)HSN code(s)-{0} is invalidFix the HSN/SAC Code on the product and the invoice line.
3039, 3041 (IRN)Pincode does not belong to the stateCorrect the pin code or state on the contact or delivery address.
2240 (IRN)GST rate of tax is incorrect or not as notifiedCorrect the tax on the invoice line, then the product's default tax.
2270 (IRN)The allowed cancellation time limit is crossedIssue a credit note instead of cancelling.
208, 212 (EWB)Invalid Supplier / Consignee GSTINCorrect the GSTIN on the company or the Bill To contact.
214 (EWB)Invalid Consignee PIN CodeFix the pin code on the Ship To address.
216 (EWB)Invalid HSN CodeFix the HSN/SAC Code on the line.
702 (EWB)The distance between the pincodes given is too highLower the Distance on the e-way bill, or set it to 0.
721 (EWB)Distance between the given pincodes not available. Please provide distance.Enter the actual road distance.
604 (EWB)E-way bill(s) are already generated for the same document numberFind the existing e-way bill on the portal; don't generate a second one.
720 (EWB)Should be generated as part of IRN generation or with reference to IRNGenerate the IRN first, then the e-way bill from it.

Code 1005 (Invalid Token) needs no action. Odoo signs in again and retries.

Invalid or inactive GSTIN

An invalid GSTIN (3028, or 208 and 212 for e-way bills) is a typo or a wrong number on the contact. An inactive or cancelled GSTIN (3029) means the registration isn't active on the GST portal.

If Check GST Number Status is enabled in the Indian settings, the contact form has a Check Status button next to the GSTIN that shows Active or Inactive and the date it was checked. If the GSTIN really is cancelled, ask your CA how to treat the supply before you change the contact's GST Treatment.

Duplicate IRN (2150)

The portal builds the IRN from your GSTIN, the document type, the document number and the financial year. Error 2150 means an IRN already exists for that combination. In Odoo this usually follows a timeout: the portal generated the IRN but the reply never arrived.

Odoo 19 handles this itself. On a 2150 it asks the portal for the IRN by document details and compares that IRN's buyer GSTIN and total invoice value with the invoice, allowing a difference of under ₹1. If they match, it stores the IRN, marks the invoice Sent, and posts a note in the chatter. If they don't match, the error stays: Duplicate IRN found for this invoice, but the buyer details or invoice values do not match.

A mismatch means the number was already used for another document, for example in an old system. Find that document before you renumber anything. A cancelled IRN also blocks its number (code 2278).

HSN errors

The portal checks HSN codes against its own master (2176 for e-invoices, 216 for e-way bills). Odoo copies the HSN/SAC Code from the product to the invoice line, so fix both.

For e-way bills, Odoo checks that each goods line has a 4, 6 or 8-digit HSN code. An e-way bill also needs at least one goods line. Codes starting with 99 are services, and a document with only services can't carry an e-way bill (portal code 724). Watch for 7-digit codes and SAC codes on goods.

Pin code, state and distance errors

A pin code that doesn't belong to the contact's state fails on both portals (3039 and 3041 for e-invoices, 436 and 437 for e-way bills). Odoo sends four addresses: your company as seller, the warehouse address as dispatch-from (or the company if the warehouse has none), the customer as buyer, and the invoice's delivery address as ship-to. Check all four.

For distance, the portal calculates its own road distance between the two pin codes. In Odoo:

  • If you leave Distance at 0, the portal uses its own figure and Odoo writes it back on the e-way bill from the portal's response.
  • If the dispatch and delivery pin codes are the same, Odoo won't send 0. Enter the real distance, because the portal rejects 0 in this case too (e-invoice portal code 4029).
  • If your figure is well above the portal's, you get 702. The portal allows only a small margin above its calculated distance (commonly cited as 10%). The portal's Pin to Pin Distance search shows its figure.
  • If the portal has no distance for that pair (721, or 4030 through the IRN), enter the actual distance.

The cancellation window for IRNs and e-way bills

NIC's API documentation says an IRN can be cancelled within 24 hours of generation, and not while a valid e-way bill exists for it. So cancel the e-way bill first. On a sent invoice, Odoo replaces Reset to Draft with Request Cancel, which opens the Cancel E-Invoice window. The reason has to be one of the portal's four codes: Duplicate, Data Entry Mistake, Order Cancelled or Others, plus a remark.

After 24 hours the portal returns 2270 and the IRN stays live. The way forward is a credit note against the invoice, which is itself e-invoiced. The error banner also offers Force Cancel. That cancels the invoice in Odoo only, and the IRN stays active on the portal. Use it only when the IRN was already cancelled elsewhere.

E-way bills have their own rule. Rule 138(9) of the CGST Rules allows cancellation within 24 hours of generation, and not after the bill has been verified in transit (portal codes 315 and 316). In Odoo, open the e-way bill, click Cancel e-Waybill, and give the same kind of reason and remark.

There is also a reporting limit. Under a GSTN advisory, from 1 April 2025 taxpayers with aggregate annual turnover of ₹10 crore or more can't report an invoice to the IRP more than 30 days after its date. So don't leave invoices in To Send.

A daily routine that prevents most rejections

  1. Clean masters before go-live. GSTINs, HSN codes, and pin codes and states on every address.
  2. Clear the To Send list daily. Large taxpayers have only 30 days to report.
  3. Fix the record, not just the line. Then send again.
  4. Cancel in order. E-way bill first, then IRN, both within 24 hours. After that, issue a credit note.
  5. Keep the GSP current. Odoo 19 marks Tera Software as deprecated; switch to BVM.

See also GST compliance in Odoo 19 and invoicing and customer payments. If rejections keep coming back, our implementation team can audit your contact and product data.

Questions we get asked

Can I cancel an e-invoice after 24 hours in Odoo?

No. The e-invoice portal only accepts IRN cancellation within 24 hours of generation, and rejects later requests with error 2270. In Odoo 19, issue a credit note against the original invoice and e-invoice the credit note. The Force Cancel option cancels the invoice in Odoo only; the IRN stays active on the portal, so use it only when the IRN was already cancelled elsewhere.

What does duplicate IRN error 2150 mean in Odoo?

Error 2150 means the portal already has an IRN for that GSTIN, document type, number and year, usually because an earlier request timed out after succeeding. Odoo 19 fetches the existing IRN and compares buyer GSTIN and invoice total. If they match, it stores the IRN and marks the invoice sent. If not, the number was used for another document and you must investigate before resending.

Why does my e-way bill fail with a distance error?

The e-way bill portal checks your distance against its own pin-to-pin figure. Error 702 means your distance is too high; 721 means the portal has no figure and needs yours. In Odoo 19, leave Distance at 0 to let the portal calculate it, except when both pin codes are the same, where you must enter the real distance. Also check the pin codes on both addresses.

Why does Odoo say the address is invalid before sending the e-invoice?

Odoo 19 checks the seller and buyer contacts against the portal's rules before sending anything: street and city of 3 to 100 characters, a state, a six-digit pin code, and a two-digit state TIN. If one fails, Odoo lists it on the invoice and doesn't call the portal. Fix the contact or the state record, then send the invoice again. Odoo reads contact details at the moment it sends.

← Previous How an Odoo implementation quote works: what's in it and how to compare quotes Next → Connecting WhatsApp to Odoo: the official app vs third-party connectors
Keep reading
Odoo 19 GST compliance in Odoo 19: taxes, HSN, e-invoice, e-way bill and GSTR 6 min read Odoo 20 Odoo 20 for Indian companies: TDS, the Composition scheme, Schedule III and the rest 8 min read Odoo 19 Odoo 19 Point of Sale for retail and restaurants 6 min read