# Fusion Accounting - Fiscal Year Opening Wizard
# Extends the base fiscal year opening wizard with
# tax periodicity configuration fields.

from odoo import api, fields, models, _


class FinancialYearOpeningWizard(models.TransientModel):
    """Extension of the fiscal year opening balance wizard that
    exposes tax periodicity settings for the current company."""

    _inherit = 'account.financial.year.op'
    _description = 'Opening Balance of Financial Year'

    # --- Tax Periodicity Configuration ---
    account_tax_periodicity = fields.Selection(
        related='company_id.account_tax_periodicity',
        string='Periodicity in month',
        readonly=False,
        required=True,
    )
    account_tax_periodicity_reminder_day = fields.Integer(
        related='company_id.account_tax_periodicity_reminder_day',
        string='Reminder',
        readonly=False,
        required=True,
    )
    account_tax_periodicity_journal_id = fields.Many2one(
        related='company_id.account_tax_periodicity_journal_id',
        string='Journal',
        readonly=False,
    )
