The Problem
In Odoo, a journal entry may contain multiple debit journal items and credit journal items.
However, there is no way for us to identify the countered line(s) of a line and its countered account(s) which may causes some troubles when:
- making reports that require showing up counterparts and countered accounts of a transaction
- identifying types of business transactions. For example, accroding to Vietnam Accounting Standards, revenues from both loan interests and exchange rate profit are also encoded into the account 515. It is impossible to build Cash Flow Statement while it requires to separate those revenues.
Features at a glance
| ID |
Account |
Countered Accounts |
Debit |
Credit |
Countered Journal Items |
| 1 |
131 |
5111, 5113 |
150 |
0 |
[2], [3] |
| 2 |
5111 |
131 |
0 |
100 |
[1] |
| 3 |
5113 |
131 |
|
50 |
[1] |
Features in Details
Journal Items
The following key stored and computed fields have been added into the Journal Item model (account.move.line):
- Countered Journal Items: the journal items that are counterparts of the current journal item.
- Countered Accounts: the accounts that are counterparts of the account of the current item.
- Countered Amount: The matched amount that has been set as countered amount for this journal item.
- Countered Status: A technical field to indicate that the journal item has either countered fully or partially or not-yet-countered.
Journal Entries
The following key stored and computed fields has been added into the Journal Entry model (account.move):
- Countered Status: A technical field to indicate that the journal entry has either countered fully or partially or not-yet-countered.
Wizards
- Counterparts Generator is a wizard to allow accounting manager to either generate missing counterparts for account journal items or regenerate counterparts for all the existing items. It also allow you to limit the number of entries during generation by select one or more journals
Journal Item Counterparts
A new technical model named 'Journal Item Counterpart' (account.move.line.ctp) is created to map a credit journal item with a debit journal item which has the following key fields:
- dr_aml_id: The debit journal item (also known as 'account move line')
- cr_aml_id: The credit journal item
- countered_amt: the amount that match the counterpart operation of the two journal items above mention
When a counterpart operation is carried out, a new record of the model Journal Item Counterpart will
be created to map a credit journal item with a debit journal item to indicate that the later journal item is a counterpart with a countered amount.
Some Use Cases for Proof of Concepts
- Entry with One single debit item and One single credit item
- Entry:
- [1] Debit 131 (Customer Receivable): $100
- [2] Credit 511 (Sales Revenue): $100
- Counterpart Mapping:
- Debit Line: [1]
- Credit Line: [2]
- Countered Amount: $100
- List view demostration:
| ID |
Account |
Countered Accounts |
Debit |
Credit |
Countered Journal Items |
| 1 |
131 |
511 |
100 |
0 |
[2] |
| 2 |
511 |
131 |
0 |
100 |
[1] |
- Entry with One single debit item and Multiple credit items
- Entry:
- [1] Debit 131 (Customer Receivable): $150
- [2] Credit 5111 (Goods Sales Revenue): $100
- [3] Credit 5113 (Service Sales Revenue): $50
- Counterpart Mapping:
- 1st Counterpart:
- Debit Line: [1]
- Credit Line: [2]
- Countered Amount: $100
- 2nd Counterpart:
- Debit Line: [1]
- Credit Line: [3]
- Countered Amount: $50
- List view demonstration
| ID |
Account |
Countered Accounts |
Debit |
Credit |
Countered Journal Items |
| 1 |
131 |
5111, 5113 |
150 |
0 |
[2], [3] |
| 2 |
5111 |
131 |
0 |
100 |
[1] |
| 3 |
5113 |
131 |
|
50 |
[1] |
- Entry with Multipe debit items and Multiple credit items
- Entry:
- [1] Debit 1311 (Customer Receivable): $120
- [2] Debit 1312 (Customer Receivable): $30
- [3] Credit 5111 (Goods Sales Revenue): $100
- [4] Credit 5113 (Service Sales Revenue): $50
- Counterpart Mapping:
- 1st Counterpart:
- Debit Line: [2]
- Credit Line: [3]
- Countered Amount: $20
- 2nd Counterpart:
- Debit Line: [2]
- Credit Line: [4]
- Countered Amount: $10
- 3rd Counterpart:
- Debit Line: [1]
- Credit Line: [3]
- Countered Amount: $80
- 4th Counterpart:
- Debit Line: [1]
- Credit Line: [4]
- Countered Amount: $40
- List view demonstration
| ID |
Account |
Countered Accounts |
Debit |
Credit |
Countered Journal Items |
| 1 |
1311 |
5111, 5113 |
120 |
0 |
[3], [4] |
| 2 |
1312 |
5113 |
30 |
0 |
[4] |
| 3 |
5111 |
1311 |
0 |
100 |
[1] |
| 4 |
5113 |
1311, 1312 |
0 |
50 |
[1], [2] |
Editions Supported
- Community Edition
- Enterprise Edition
Phần mềm này và các tệp liên kết ("Phần mềm")
được sử dụng (chạy, tuỳ biến, chạy sau khi được tuỳ biến)
chỉ khi bạn mua được giấy phép có hiệu lực từ tác giả,
điển hình như qua các Ứng dụng Odoo, hoặc trong trường hợp
bạn nhận được thoả thuận bằng văn bản từ tác giả của Phần mềm (chi tiết tại tệp COPYRIGHT).
Bạn có thể phát triển các phân hệ Odoo có sử dụng Phần mềm như một Thư viện (thường là phụ thuộc vào, nhập vào và sử dụng nguồn của nó)
nhưng không sao chéo bất kỳ mã nguồn hay tài liệu nào thuộc Phần mềm. Bạn có thể phân phối những phân hệ này theo giấy phép
mà bạn lựa chọn, miễn sao nội dung giấy phép đó tương tích với điều khoản của Giấy phép Phần mềm Độc quyền Odoo
(ví dụ: LGPL, MIT hay bất kỳ loại giấy phép phần mềm độc quyền nào tương tự vậy).
Nghiêm cấm phát hành, phân phối, cấp phép lại hoặc bán bản sao của Phần mềm hoặc
bản sao
Phần mềm đã được sửa đổi.
Thông báo bản quyền và chấp thuận nêu trên buộc phải được bao gồm trong tất cả các bản sao hoặc các phần quan trọng của Phần mềm.
PHẦN MỀM ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG", KHÔNG BẢO ĐẢM DƯỚI BẤT KỲ HÌNH THỨC NÀO, ĐƯỢC THỂ HIỆN RÕ RÀNG HOẶC NGỤ Ý, KHÔNG GIỚI HẠN
ĐẢM BẢO VỀ CÁC BẢO ĐẢM NGỤ Ý VỀ KHẢ NĂNG THƯƠNG MẠI, PHÙ HỢP VỚI MỤC ĐÍCH CỤ THỂ VÀ KHÔNG VI PHẠM.
TRONG MỌI TRƯỜNG HỢP SẼ KHÔNG CÓ TÁC GIẢ HOẶC CHỦ SỞ HỮU BẢN QUYỀN NÀO CHỊU TRÁCH NHIỆM VỀ BẤT KỲ KHIẾU NẠI,
THIỆT HẠI HOẶC TRÁCH NHIỆM PHÁP LÝ KHÁC NÀO TRONG PHẠM VI HỢP ĐỒNG, CÁC THIỆT HẠI HOẶC CÁCH KHÁC, PHÁT SINH TỪ, NGOÀI HOẶC
CÓ LIÊN KẾT VỚI PHẦN MỀM HOẶC VIỆC SỬ DỤNG HOẶC KINH DOANH KHÁC TẠI PHẦN MỀM.