account_shared_bank_cash/models/account_journal.py

36 lines
1.3 KiB
Python

# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class AccountJournal(models.Model):
_inherit = 'account.journal'
is_centralized = fields.Boolean(
string='Is Centralized Payment',
help="If checked, payments made using this journal will be recorded in the parent company."
)
parent_company_id = fields.Many2one(
'res.company',
string='Parent Company',
help="The parent company where the actual bank payment will be recorded."
)
parent_journal_id = fields.Many2one(
'account.journal',
string='Parent Bank Journal',
domain="[('company_id', '=', parent_company_id), ('type', 'in', ('bank', 'cash'))]",
check_company=False,
help="The actual bank journal in the parent company."
)
parent_intercompany_account_id = fields.Many2one(
'account.account',
string='Parent Inter-company Account',
check_company=False,
help="The Hubungan RK account in the parent company to debit (Receivable from branch)."
)
branch_intercompany_account_id = fields.Many2one(
'account.account',
string='Branch Inter-company Account',
check_company=False,
help="The Hubungan RK account in the branch company to credit (Liability to parent)."
)