diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-02 19:36:16 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-02 19:36:16 +0200 |
| commit | 87e21ccdc5c181960fa0d137e3ed880673032ca9 (patch) | |
| tree | 5aa3efc5a04796733c242129d91343149839abcb /addons/l10n_do | |
| parent | 3596e67afb72aac22d9a71ddf542cc5bbe00bce0 (diff) | |
| parent | 521414b1c106187ceac972ba7ae6f5c342959940 (diff) | |
[MERGE] forward port branch 11.0 up to 521414b1c10
Diffstat (limited to 'addons/l10n_do')
| -rw-r--r-- | addons/l10n_do/models/chart_template.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/addons/l10n_do/models/chart_template.py b/addons/l10n_do/models/chart_template.py index 73e99589873..97d0833fef6 100644 --- a/addons/l10n_do/models/chart_template.py +++ b/addons/l10n_do/models/chart_template.py @@ -13,6 +13,49 @@ class WizardMultiChartsAccounts(models.TransientModel): return [ {'acc_name': _('Cash'), 'account_type': 'cash'}, {'acc_name': _('Caja Chica'), 'account_type': 'cash'}, + {'acc_name': _('Cheques Clientes'), 'account_type': 'cash'}, {'acc_name': _('Bank'), 'account_type': 'bank'} ] return super(WizardMultiChartsAccounts, self)._get_default_bank_account_ids() + + +class AccountChartTemplate(models.Model): + _inherit = "account.chart.template" + + @api.multi + def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None): + """Create fiscal journals for buys""" + res = super(AccountChartTemplate, self)._prepare_all_journals( + acc_template_ref, company, journals_dict=journals_dict) + if not self == self.env.ref('l10n_do.do_chart_template'): + return res + for journal in res: + if journal['code'] == 'FACT': + journal['name'] = _('Compras Fiscales') + res += [{ + 'type': 'purchase', + 'name': _('Compras Informales'), + 'code': 'CINF', + 'company_id': company.id, + 'show_on_dashboard': True + }, { + 'type': 'purchase', + 'name': _('Gastos Menores'), + 'code': 'GASM', + 'company_id': company.id, + 'show_on_dashboard': True + }, { + 'type': 'purchase', + 'name': _('Compras al Exterior'), + 'code': 'CEXT', + 'company_id': company.id, + 'show_on_dashboard': True + }, { + 'type': 'purchase', + 'name': _('Gastos No Deducibles'), + 'code': 'GASTO', + 'company_id': company.id, + 'show_on_dashboard': True + }] + return res + |
