| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 531 |
| Technical Name |
account_counterpart |
| License | OPL-1 |
Counterpart accounts on every journal entry.
Automatically. Always correct.
Accounting Standards require a counterpart account on every line of every journal entry. Odoo does not track this natively. This module fills the gap — on every balanced move, automatically, with a mathematically minimal pairing algorithm.
This module is for you if…
- ✓ You produce VAS-compliant reports (B01/B02/B03-DN, Sổ Cái, Sổ chi tiết).
- ✓ You spend hours each month matching debits to credits by hand for ledger and audit work.
- ✓ You need to backfill counterparts on years of historical journal entries.
- ✓ You're planning to install VN Financial Reports — counterpart data is the foundation it reads from.
The missing piece between Odoo and Vietnamese reports.
A standard journal entry in Odoo records each line's debit or credit balance — but never which other account offset it. VAS reports need that linkage on every line.
This module computes the counterpart pairs at transaction commit, in O(n+m) time using the Northwest Corner Method. Every line ends up with a complete debit-side and credit-side breakdown, summing back to the line's own balance — checked by an integrity invariant on every recompute.
Before & after
Same balanced journal entry, both views.
- Line 1 — Debit 111 Cash 10,000,000
- Line 2 — Debit 642 OpEx 5,000,000
- Line 3 — Credit 511 Revenue 12,000,000
- Line 4 — Credit 711 Other Inc 3,000,000
Balances are correct, but no record of which credit account offset which debit. VAS reports cannot be produced from this alone.
- 111 → 511 10,000,000
- 642 → 511 2,000,000
- 642 → 711 3,000,000
Three counterpart pairs sum back to the original balances exactly. Sổ Cái, Sổ chi tiết, B01/B02/B03 reports can now be built directly.
What you get
Six guarantees, every one of them automatic.
Auto on every balanced entry
The moment a journal entry balances, counterpart pairs are generated at transaction commit. Works for invoices, manual entries, payments, and every other ORM path.
Mathematically minimal pairing
A pure Northwest Corner Method implementation produces at
most n+m−1 pairs per move — the proven minimum
for a balanced transportation problem.
Integrity guarantee
An invariant checks that counterpart sums match each line's balance on every recompute. Mismatches raise a validation error before commit — counterparts can never silently drift from the books.
Multi-company, opt-in
A per-company toggle enables the engine only where Vietnamese reporting is needed. International sister companies on the same database are untouched.
Historical backfill cron
A scheduled cron processes historical moves in batches (default 300 / 10 min) so the engine can be retrofitted onto existing databases without a downtime window.
Performance-tuned
Two composite indexes on
(account_id, date) for debit and credit sides.
Pre-commit batching avoids re-computing the same move
multiple times within a single transaction.
A look inside
How counterpart data is presented in Odoo.
Overview. Counterpart entries listed under Accounting, with debit account, credit account, partner, journal and date.
On the journal entry. A dedicated tab on every move shows the counterpart pairs computed for that transaction.
Counterpart list. Filter by account, by partner, by period — the same dataset that VAS reports aggregate on.
How it works
Three steps — most of them happen on their own.
Install the module. In each Vietnamese company, the "counterpart tracking" toggle is on by default.
Continue creating invoices, payments and manual entries as usual. Counterpart pairs are produced on transaction commit, invisibly.
Enable the historical-backfill cron. It processes past moves in batches, leaving the database fully populated without a maintenance window.
Who it is for
If you produce VAS reports out of Odoo, you need this.
Build Sổ Cái, Sổ chi tiết tài khoản, Bảng cân đối số phát sinh from data — not from copy-paste.
Trace every reported figure back to a specific counterpart pair, balanced and verifiable.
The "VN Financial Reports" module (B01/B02/B03-DN per TT 99/2025) reads from counterpart data directly. This module is its hard dependency.
Compatibility
Read this before purchasing.
Odoo version
Odoo 18.0 — Community and Enterprise editions both supported. Each major Odoo version is sold as a separate product per Odoo Apps sales conditions.
Hosting
Installable on Odoo.sh and on-premise Odoo. Not installable on Odoo Online (SaaS) — this is an Odoo platform restriction on all third-party apps.
Dependencies
Only Odoo standard account — no OCA
modules and no external Python packages. The
pairing algorithm is pure-Python stdlib.
Goes well with
VN Financial Reports (B01/B02/B03-DN per TT 99/2025/TT-BTC) — same author, designed to consume the counterpart data this module produces.
Support & refund
Bug reports, installation help and follow-up questions are handled by the author through the Odoo Apps support channel. Please include your Odoo version, module version and the steps to reproduce.
info@econnector.clickRefunds follow standard Odoo Apps sales conditions — customers may file a claim within two months of purchase, and the author has fifteen days to resolve before escalation.
🇻🇳 Tóm tắt bằng tiếng Việt
Module tự động sinh phát sinh đối ứng (tài khoản đối ứng) trên mọi bút toán cân của Odoo — dữ liệu nền tảng để lập Sổ Cái, Sổ chi tiết tài khoản, Bảng cân đối số phát sinh và các báo cáo tài chính theo VAS / Thông tư 99/2025/TT-BTC.
Phù hợp với: Đội ngũ kế toán doanh nghiệp Việt Nam, đội kiểm toán nội bộ và độc lập, và đối tác triển khai Odoo cho khách hàng VN.
Lợi ích chính:
- Mỗi bút toán có sẵn thông tin đối ứng — không phải xử lý tay
- Số liệu đối ứng luôn khớp với balance từng dòng — sẵn sàng cho thanh tra, kiểm toán
- Bật/tắt theo công ty: pháp nhân VN bật, pháp nhân quốc tế giữ nguyên
- Áp dụng được trên dữ liệu lịch sử — không cần downtime
- Nền tảng để cài tiếp VN Financial Reports (B01/B02/B03) cùng tác giả
Yêu cầu: Odoo 18.0 (Community hoặc Enterprise), cài trên Odoo.sh hoặc on-premise (Odoo Online SaaS không hỗ trợ third-party app).
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module