(self, acc_template_ref, company, journals_dict=None)
return True
This method is used for creating journals.

        :param acc_template_ref: Account templates reference.
        :param company_id: company to generate journals for.
        :returns: True
This method is used for creating journals.
This method is used for creating journals .
def generate_journals(self, acc_template_ref, company, journals_dict=None):
        """
        This method is used for creating journals.

        :param acc_template_ref: Account templates reference.
        :param company_id: company to generate journals for.
        :returns: True
        """
        JournalObj = self.env['account.journal']
        for vals_journal in self._prepare_all_journals(acc_template_ref, company, journals_dict=journals_dict):
            journal = JournalObj.create(vals_journal)
            if vals_journal['type'] == 'general' and vals_journal['code'] == _('EXCH'):
                company.write({'currency_exchange_journal_id': journal.id})
            if vals_journal['type'] == 'general' and vals_journal['code'] == _('CABA'):
                company.write({'tax_cash_basis_journal_id': journal.id})
        return True
def generate_journals ( self , acc_template_ref , company , journals_dict = None ) : JournalObj = self . env [ 'account.journal' ] for vals_journal in self . _prepare_all_journals ( acc_template_ref , company , journals_dict = journals_dict ) : journal = JournalObj . create ( vals_journal ) if vals_journal [ 'type' ] == 'general' and vals_journal [ 'code' ] == _ ( 'EXCH' ) : company . write ( { 'currency_exchange_journal_id' : journal . id } ) if vals_journal [ 'type' ] == 'general' and vals_journal [ 'code' ] == _ ( 'CABA' ) : company . write ( { 'tax_cash_basis_journal_id' : journal . id } ) return True