By checking the script checking if all the account supposed to be in the BS are. The account 1380 of skr03 and the account 9090 of skr04 seems to be miss configured. For the first account, we went back to task 31826 when the account was added. And we think that the account 1380 was indeed misconfigured. For the other, by comparing with skr03 which has the same account, we can see that the type of the account is wrong. Also, the balance sheet works with tags. Some accounts added after the load of the chart template were missing some tags. By overriding those methods, we can add tags afterward and be sure that those account are present in the Balance sheet. closes odoo/odoo#117881 Task-id: 3041738 X-original-commit: 44e8295b2df5db73efa7a85003332c092fbfca7b Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com> Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
25 lines
1.2 KiB
Python
25 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
from odoo.addons.account.models.chart_template import template
|
|
from odoo import models
|
|
|
|
class AccountChartTemplate(models.AbstractModel):
|
|
_inherit = 'account.chart.template'
|
|
|
|
@template('de_skr03', 'res.company')
|
|
@template('de_skr04', 'res.company')
|
|
def _get_de_res_company(self):
|
|
return {
|
|
self.env.company.id: {
|
|
'external_report_layout_id': 'l10n_din5008.external_layout_din5008',
|
|
'paperformat_id': 'l10n_din5008.paperformat_euro_din',
|
|
}
|
|
}
|
|
|
|
def _setup_utility_bank_accounts(self, template_code, company, template_data):
|
|
super()._setup_utility_bank_accounts(template_code, company, template_data)
|
|
if template_code in ["de_skr03", "de_skr04"]:
|
|
company.account_journal_suspense_account_id.tag_ids = self.env.ref('l10n_de.tag_de_asset_bs_B_II_4')
|
|
company.account_journal_payment_debit_account_id.tag_ids = self.env.ref('l10n_de.tag_de_asset_bs_B_II_4')
|
|
company.account_journal_payment_credit_account_id.tag_ids = self.env.ref('l10n_de.tag_de_asset_bs_B_II_4')
|
|
company.transfer_account_id.tag_ids = self.env.ref('l10n_de.tag_de_asset_bs_B_IV')
|