2018-01-16 06:58:15 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2018-01-16 11:34:37 +01:00
|
|
|
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
2018-01-16 06:58:15 +01:00
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
from flectra import api, models, _
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
class AccountChartTemplate(models.Model):
|
|
|
|
_inherit = 'account.chart.template'
|
|
|
|
|
|
|
|
|
|
|
|
@api.multi
|
|
|
|
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
|
|
|
|
res = super(AccountChartTemplate, self)._prepare_all_journals(
|
|
|
|
acc_template_ref, company, journals_dict=journals_dict)
|
|
|
|
if not self == self.env.ref('l10n_in.indian_chart_template_standard'):
|
|
|
|
return res
|
|
|
|
for journal in res:
|
|
|
|
if journal['code'] == 'INV':
|
|
|
|
journal['name'] = _('Tax Invoices')
|
|
|
|
|
|
|
|
res += [{'type': 'sale', 'name': _('Retail Invoices'), 'code': 'RETINV', 'company_id': company.id, 'show_on_dashboard': True,},
|
|
|
|
{'type': 'sale', 'name': _('Export Invoices'), 'code': 'EXPINV', 'company_id': company.id, 'show_on_dashboard': True,},]
|
|
|
|
return res
|