Skip to content
Snippets Groups Projects
Commit 3b774ee3 authored by Laurent Smet's avatar Laurent Smet Committed by qdp-odoo
Browse files

[FIX] l10n_mx: fix bad reference to account.account skiping the mapping to templates

    Hardcoded reference skips the mapping (company, template) -> account.account leading to key error.
parent 34853563
No related branches found
No related tags found
No related merge requests found
......@@ -66,14 +66,14 @@ class AccountChartTemplate(models.Model):
acc_template_ref, company, journals_dict=journals_dict)
if not self == self.env.ref('l10n_mx.mx_coa'):
return res
account = self.env.ref('l10n_mx.1_cuenta118_01')
account = acc_template_ref.get(self.env.ref('l10n_mx.cuenta118_01').id)
res.append({
'type': 'general',
'name': _('Effectively Paid'),
'code': 'CBMX',
'company_id': company.id,
'default_credit_account_id': account.id,
'default_debit_account_id': account.id,
'default_credit_account_id': account,
'default_debit_account_id': account,
'show_on_dashboard': True,
})
return res
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment