'This method is used for creating journals.
:param chart_temp_id: Chart Template Id.
:param acc_template_ref: Account templates reference.
:param company_id: company_id selected from wizard.multi.charts.accounts.
:returns: True'

@api.model
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})
    return True
