55 lines
2.1 KiB
Python
55 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models, fields
|
|
|
|
|
|
class PosPaymentMethod(models.Model):
|
|
_inherit = 'pos.payment.method'
|
|
|
|
# --- Branch-side clearing configuration ---
|
|
intercompany_clearing_account_id = fields.Many2one(
|
|
'account.account',
|
|
string='Inter-Company Clearing Account',
|
|
domain="[('account_type', 'in', ['asset_receivable', 'liability_payable', 'asset_current'])]",
|
|
help="If specified, an automatic clearing entry will be generated when a POS session closes. "
|
|
"This is used to transfer the balance from a shared parent bank account to an inter-company account."
|
|
)
|
|
|
|
intercompany_clearing_journal_id = fields.Many2one(
|
|
'account.journal',
|
|
string='Clearing Journal',
|
|
domain="[('type', '=', 'general')]",
|
|
help="Journal to use for the automated inter-company clearing entries."
|
|
)
|
|
|
|
# --- Parent-side mirror entry configuration ---
|
|
parent_company_id = fields.Many2one(
|
|
'res.company',
|
|
string='Parent Company',
|
|
help="The parent company where the mirror clearing entry will be created. "
|
|
"Leave empty to auto-detect from the branch company's parent."
|
|
)
|
|
|
|
parent_bank_journal_id = fields.Many2one(
|
|
'account.journal',
|
|
string='Parent Bank Journal',
|
|
domain="[('type', '=', 'bank')]",
|
|
help="The bank journal in the parent company. Its outstanding receipt account will be debited "
|
|
"in the mirror entry, allowing reconciliation with the parent's bank statement."
|
|
)
|
|
|
|
parent_intercompany_account_id = fields.Many2one(
|
|
'account.account',
|
|
string='Parent Hubungan RK Account',
|
|
domain="[('reconcile', '=', True)]",
|
|
help="The Hubungan RK liability account (e.g., 229101) in the parent company to credit. "
|
|
"This represents the parent's liability to the branch."
|
|
)
|
|
|
|
parent_clearing_journal_id = fields.Many2one(
|
|
'account.journal',
|
|
string='Parent Clearing Journal',
|
|
domain="[('type', '=', 'general')]",
|
|
help="Journal in the parent company to use for the mirror clearing entry."
|
|
)
|