diff options
| author | Laurent Smet <las@openerp.com> | 2017-03-21 10:13:11 +0100 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2017-03-21 10:13:11 +0100 |
| commit | 3b774ee32948237d102443c0fcf291bfa5c80a7f (patch) | |
| tree | 5a0c7ca250bb54f3d526163da5e6f307b7528c3b /addons/l10n_mx/models | |
| parent | 348535630b53b96a52af25ce3ee3a01e4275e245 (diff) | |
[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.
Diffstat (limited to 'addons/l10n_mx/models')
| -rw-r--r-- | addons/l10n_mx/models/chart_template.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/l10n_mx/models/chart_template.py b/addons/l10n_mx/models/chart_template.py index b02eafdaa69..155877b2761 100644 --- a/addons/l10n_mx/models/chart_template.py +++ b/addons/l10n_mx/models/chart_template.py @@ -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 |
