Demo video: Account Counterparts
The Problem
In the accounting feature, a single journal entry may contain multiple debit journal items and multiple 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 cause some troubles when:
- Making reports that require showing up counterparts and countered accounts of a transaction.
- Identifying types of business transactions. For example, according to Vietnam Accounting Standards, revenues are from both loan interests and exchange.
rate profit is also encoded into account 515. It is impossible to build a Cash Flow Statement while it requires separating those revenues.
Features at a glance
Create counterpart links for journal items, providing essential information to support the handling of accounting operations.
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
- Automatically create counterparts generator when entering journal entries
- When an accounting entry is entered, the system automatically creates counterparts generator from the entries:
- For entries with only one Debit and one Credit, the system creates a corresponding link between these two entries.
- For entries with multiple Debit entries corresponding to multiple Credit entries or vice versa, the system creates counterparts generator with the following priority order: Prioritize pairs of entries with the same counterpart, with equal values that can be matched, the remaining entries will be created counterparts generator according to the ratio.
- Create corresponding links
- Allows the Chief Accountant to create missing counterparts for account entries or recreate counterparts for all existing entries.
- It also allows limiting the number of entries when creating by selecting one or more journals.
- Cron Job: Create Counterpart scheduler
- Use the "Scheduled Actions" menu in the system or write code to configure a cron job to run periodically, such as daily or weekly.
Some Use Cases for Proof of Concepts
Entry with One single debit item and One single credit item
- a. Entry
- [1] Debit 131 (Customer Receivable): $100;
- [2] Credit 511 (Sales Revenue): $100.
- b. Counterpart Mapping
- Debit Line: [1];
- Credit Line: [2];
- Countered Amount: $100.
- c. 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
- a. Entry
- [1] Debit 131 (Customer Receivable): $150;
- [2] Credit 5111 (Goods Sales Revenue): $100;
- [3] Credit 5113 (Service Sales Revenue): $50.
- b. Counterpart Mapping
- 1st Counterpart:
- Debit Line: [1]
- Credit Line: [2]
- Countered Amount: $100
- 2nd Counterpart:
- Debit Line: [1]
- Credit Line: [3]
- Countered Amount: $50
- c. 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
- a. 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.
- b. 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.
- c. 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] |
Technical Description
Journal Items
The following key stored and computed fields have been added to 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 have been added to 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 the accounting manager to either generate missing counterparts for account journal items or regenerate counterparts for all the existing items. It also allows you to limit the number of entries during generation by selecting 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 matches the counterpart operation of the two journal items above mentioned.
When a counterpart operation is carried out, a new record of the Journal Item Counterpart model 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.
Editions Supported
- Community Edition
- Enterprise Edition
Installation
- Navigate to Apps.
- Search with keyword to_account_counterpart.
- Press Install.
Note:
- After installing to_account_counterpart module, Invoicing app is auto-installed.
- To have a full feature-related observation of this module, you need to install Accounting app.
- The journal entries can be automatically or manually accounted.
Instruction
Instruction video: Account Counterparts
Step 1: Go to Accounting App > Vendors > Bills, press Create button to create a bill.
Step 2: Press Confirm button and review the journal items on the Journal Items tab.
Step 3: Check the accounting information in Counterparts Mapping tab.
Step 4: Print the accounting template related to countered accounts. For example, print Ledger (S03b-DN).
Step 5: Go to Accounting app > Accounting > Journal Items, search the information related to countered accounts by the filter/groups tool. For example, control the balance of account 331 according to the partners and the countered accounts.
Note: You need activate developer mode (debug mode) to see Journal Items menu.
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.
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.
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.