| 1 | from odoo import models, _ |
| 2 | from odoo.addons.account.models.chart_template import template |
| 3 | |
| 4 | |
| 5 | class AccountChartTemplate(models.AbstractModel): |
| 6 | _inherit = 'account.chart.template' |
| 7 | |
| 8 | @template('gw_syscebnl') |
| 9 | def _get_gw_syscebnl_template_data(self): |
| 10 | return { |
| 11 | 'name': _('SYSCEBNL for Associations'), |
| 12 | 'parent': 'syscebnl', |
| 13 | 'code_digits': '6', |
| 14 | } |
| 15 | |
| 16 | @template('gw_syscebnl', 'res.company') |
| 17 | def _get_gw_syscebnl_res_company(self): |
| 18 | company_values = super()._get_syscebnl_res_company() |
| 19 | company_values[self.env.company.id].update( |
| 20 | { |
| 21 | 'account_fiscal_country_id': 'base.gw', |
| 22 | 'account_sale_tax_id': 'syscebnl_tva_sale_5', |
| 23 | 'account_purchase_tax_id': 'syscebnl_tva_purchase_5', |
| 24 | } |
| 25 | ) |
| 26 | return company_values |
| 27 | |
| 28 | @template('gw_syscebnl', 'account.account') |
| 29 | def _get_gw_syscebnl_account_account(self): |
| 30 | return self._parse_csv('gw_syscebnl', 'account.account', module='l10n_syscohada') |