Skip to Content

Issuing Fapiao Straight From Odoo: A Bridge Into China's Digital e-Invoicing (数电票)

September 4, 2026 by
Issuing Fapiao Straight From Odoo: A Bridge Into China's Digital e-Invoicing (数电票)
Majorbird

Issuing Fapiao Straight From Odoo: A Bridge Into China's Digital e-Invoicing (数电票)

在Odoo里直接开票:打通中国数电票的最后一公里

Emitir fapiao directamente desde Odoo: un puente hacia la factura electrónica digital de China (数电票)

Émettre des fapiao directement depuis Odoo : une passerelle vers la facturation électronique numérique en Chine (数电票)

إصدار الفاتورة الرسمية (fapiao) مباشرة من Odoo: جسر نحو الفوترة الإلكترونية الرقمية في الصين (数电票)

Phát hành Fapiao ngay trên Odoo: Cầu nối vào hệ sinh thái hóa đơn điện tử số của Trung Quốc (数电票)

Issuing Fapiao Straight From Odoo: A Bridge Into China's Digital e-Invoicing

Every business operating in mainland China has to issue fapiao (发票), the official, government-regulated tax invoice. It is not paperwork you can skip. A sale is not properly documented, for tax purposes, until a compliant fapiao exists for it.

China is also mid-transition to fully digital e-fapiao, known as 数电票, and the rules that come with it are genuinely intricate. Every line item needs a national tax-classification code. The seller's digital tax account needs a live session with the tax bureau, or issuance silently fails. Cancelling an invoice is not a delete; it is a red-reversal (红冲) that can require the buyer to confirm within 72 hours.

Companies running Odoo have all of their sales and invoicing sitting right there in the ERP. Odoo, though, has no native bridge into China's e-invoicing system. The common result is manual double-entry between Odoo and the fapiao platform, which is slow, error-prone, and a genuine compliance risk: get a tax code or tax rate wrong and the tax authority rejects the invoice outright.

What we built, and what's new

Majorbird built an integration that connects Odoo directly to Baiwang (百望云), one of China's major e-invoicing platforms, so a fapiao can be issued, and reversed, straight from an Odoo invoice, with no manual re-entry. That much was the original design. What has since moved from "built" to demonstrated end to end: a user takes an existing Odoo invoice, and the fapiao, invoice number and official PDF alike, comes back and lands directly on that same Odoo invoice record. There is no separate Baiwang portal to log into. The person doing the work never leaves Odoo.

A connector service carries all of the China-specific complexity, authentication, request signing, the asynchronous issuance model, the red-reversal workflow, tax-code handling, so Odoo itself never has to speak Baiwang's technical dialect. It talks to a clean, neutral interface, and the connector does the hard part.

How it works, and where it lives in Odoo

A user clicks Generate Fapiao on a customer invoice. Because issuance is asynchronous, Baiwang accepts the request first and produces the actual fapiao moments later, so the connector polls until it is confirmed, then writes the fapiao number and PDF back into Odoo. Cancelling works the same way, through a standard Odoo credit note, which drives the compliant red-reversal process behind the scenes.

Two details make it feel native rather than bolted on. First, buyer invoice-header autofill: type a customer's name and pull their official invoice header, registered name, tax number, address, bank, straight from the tax platform, so nobody hand-keys a company's 抬头 and gets a character wrong. Second, the connector hosts its own tax-classification code list, with a refresh mechanism, so products map to the correct national code without someone maintaining a lookup table by hand.

A dedicated record tracks each fapiao's full lifecycle, submitted through issued or failed and through the reversal states, with the fapiao number, status, and PDF right there on the invoice. And the Odoo side is built with clean, vendor-neutral fields rather than hard-wiring "Baiwang" into the data model, which keeps the solution portable if that ever needs to change.

Robust by design, not just by demo

Most first attempts at something like this get the happy path working and stop. The real engineering is in what happens off that path. Issuance is idempotent and vendor-confirmed, so a retry never produces a duplicate tax document. Error handling is deliberately smart rather than reflexive: the system distinguishes a transient failure worth retrying from a data problem that needs a human fix, so it never blindly hammers the tax authority with the same bad request. The digital-account session with the tax bureau is proactively monitored, because if it lapses, every issuance fails silently until someone notices, which is one of the sharper edges of Chinese e-invoicing in practice. Red-reversal is supported as the genuine, multi-step process Chinese tax law requires, not a fictional undo button. Real-time push callbacks from the tax platform, rather than polling alone, are a documented next step.

Our take

The goal isn't just to connect Odoo to a tax platform. It's to make Chinese fapiao compliance feel like a native part of the ERP, robust by design, rather than a bolt-on portal someone has to remember to log into. That is Majorbird's Odoo and China-localization expertise made concrete, and it has been proven end to end in a sandbox environment. If China e-invoicing compliance is somewhere between "on the roadmap" and "keeping us up at night," that is a conversation worth having with the Majorbird team at odoo@majorbird.com or www.majorbird.com.

Sources & Links

  • Baiwang — China e-invoicing / fapiao platform (State Taxation Administration e-invoice service contractor)
in News
Majorbird at Odoo Experience 2026 LATAM (event coverage)