Files
odoo_source/addons/l10n_si/models/template_si.py
T
Dylan Kiss (dyki) 094ed83d4a [FIX] l10n_*: add missing tax closing accounts
* l10n_ae, l10n_ar, l10n_at, l10n_au, l10n_bg, l10n_br, l10n_ch,
l10n_cl, l10n_dk, l10n_es, l10n_hu, l10n_in, l10n_mn, l10n_nl, l10n_no,
l10n_pt, l10n_sa, l10n_se, l10n_sg, l10n_si, l10n_uk

Some localizations do not have any default account for tax closing.
This leads to the opening of a RedirectWarning when trying to do a tax
closing.

task-3082332

closes odoo/odoo#124003

X-original-commit: 14abe7acb11d522fb2b4a274ac0eb06d41e637ed
Related: odoo/enterprise#42071
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-06-07 08:59:00 +02:00

35 lines
1.4 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@template('si')
def _get_si_template_data(self):
return {
'property_account_receivable_id': 'gd_acc_120000',
'property_account_payable_id': 'gd_acc_220000',
'property_account_expense_categ_id': 'gd_acc_702000',
'property_account_income_categ_id': 'gd_acc_762000',
'property_tax_payable_account_id': 'gd_acc_260800',
'property_tax_receivable_account_id': 'gd_acc_160800',
'code_digits': '6',
'use_storno_accounting': True,
}
@template('si', 'res.company')
def _get_si_res_company(self):
return {
self.env.company.id: {
'account_fiscal_country_id': 'base.si',
'bank_account_code_prefix': '110',
'cash_account_code_prefix': '100',
'transfer_account_code_prefix': '109',
'account_default_pos_receivable_account_id': 'gd_acc_125000',
'income_currency_exchange_account_id': 'gd_acc_777000',
'expense_currency_exchange_account_id': 'gd_acc_484000',
},
}