(self, acc_template_ref, company, journals_dict=None)
return res
Set the tax_cash_basis_journal_id on the company
Set the tax_cash_basis_journal_id on the company
Set the tax_cash_basis_journal_id on the company
def generate_journals(self, acc_template_ref, company, journals_dict=None):
        """Set the tax_cash_basis_journal_id on the company"""
        res = super(AccountChartTemplate, self).generate_journals(
            acc_template_ref, company, journals_dict=journals_dict)
        if not self == self.env.ref('l10n_mx.mx_coa'):
            return res
        journal_basis = self.env['account.journal'].search([
            ('company_id', '=', company.id),
            ('type', '=', 'general'),
            ('code', '=', 'CBMX')], limit=1)
        company.write({'tax_cash_basis_journal_id': journal_basis.id})
        return res
def generate_journals ( self , acc_template_ref , company , journals_dict = None ) : res = super ( AccountChartTemplate , self ) . generate_journals ( acc_template_ref , company , journals_dict = journals_dict ) if not self == self . env . ref ( 'l10n_mx.mx_coa' ) : return res journal_basis = self . env [ 'account.journal' ] . search ( [ ( 'company_id' , '=' , company . id ) , ( 'type' , '=' , 'general' ) , ( 'code' , '=' , 'CBMX' ) ] , limit = 1 ) company . write ( { 'tax_cash_basis_journal_id' : journal_basis . id } ) return res