account_shared_bank_cash/README.md

33 lines
2.4 KiB
Markdown

# Account Shared Bank Cash
## Overview
This custom Odoo 19 module removes the standard restriction that prevents Chart of Accounts (COA) of type **Bank and Cash** (`asset_cash`) from being shared across multiple companies.
By default, Odoo restricts a Bank and Cash account to a single company. This module patches `_check_company_consistency` on the `account.account` model to allow you to configure multiple companies for a single Bank/Cash account. This is particularly useful for setups where multiple Point of Sale (POS) shops across different companies deposit into the same physical bank account or cash account.
## Features
### 1. Shared COA Support
- Overrides `account.account` company validation to allow `len(company_ids) > 1` on `asset_cash` accounts.
- Ensures POS payments and closing entries seamlessly use the shared account.
### 2. Automated Inter-Company Clearing
When a branch-side POS session is closed, the module automates the inter-company accounting flow:
- **Branch Company (Origin)**:
- Aggregates all bank clearing entries into a **single aggregated journal entry** (usually just 2 lines: Total Receivable vs Total Inter-company Account).
- Automatically reconciles these clearing lines against the main POS session move.
- Visually links the clearing moves to the POS Session's **"Journal Items"** dashboard.
- **Parent Company (Destination)**:
- Automatically creates **separate mirror journal entries** for each payment method (e.g., separate entries for BCA, BTN, BRI).
- Debits the parent bank's **Outstanding Receipt Account**, allowing for seamless reconciliation against incoming bank statement lines in the parent's accounting dashboard.
- Credits the Inter-company Liability account (e.g., `229101 Hubungan RK`).
## Configuration
To enable the automated inter-company clearing, navigate to **Point of Sale > Configuration > Payment Methods** and configure the following in the "Inter-Company Clearing" section:
- **Parent Company**: Select the target company (e.g., OT).
- **Parent Bank Journal**: Select the journal in the parent company that receives the funds.
- **Parent Inter-company Account**: The liability account in the parent company (e.g., `229101 Hubungan RK`).
- **Parent Clearing Journal**: The journal in the parent company used to record these mirror entries (e.g., "Inter-Company Clearing").
## Author
- **Suherdy Yacob**