'''
Created on Mar 19, 2024

@author: Ahmed Ameeri
'''
from odoo import fields, models

class AccountJournal(models.Model):
    _inherit = "account.journal"
    
    def action_new_transaction(self):
        action = self.env['ir.actions.act_window']._for_xml_id('account.action_bank_statement_tree')
        action['context'] = {'default_journal_id': self.id}
        action['views'] = [(False, 'form')]
        return action
