Files
odoo_source/addons/l10n_dz/models/template_dz.py
T
hupo-odoo a4583a1aa6 [IMP] l10n_{mx,ua,in,dz,ma}: activate default setting
For Mexican localization, activate by default the setting display_invoice_amount_total_words for the Mexican localization. As this localization uses its own amount to words function, the related commit enables an override of the generic function to use it correctly with Mexican localization.

For the other mentioned localizations (ua,in,dz,ma), the setting was already activated but overriding the create method was not a proper way of doing.

task - 3367243

closes odoo/odoo#124909

X-original-commit: 6ee9842764e0b1244927cb8ece1f6407ccec20d5
Related: odoo/enterprise#42510
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-06-14 10:54:24 +02:00

37 lines
1.5 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('dz')
def _get_dz_template_data(self):
return {
'property_account_receivable_id': 'l10n_dz_413',
'property_account_payable_id': 'l10n_dz_401',
'property_account_expense_categ_id': 'l10n_dz_600',
'property_account_income_categ_id': 'l10n_dz_700',
'code_digits': 6,
'display_invoice_amount_total_words': True,
}
@template('dz', 'res.company')
def _get_dz_res_company(self):
return {
self.env.company.id: {
'account_fiscal_country_id': 'base.dz',
'bank_account_code_prefix': '512',
'cash_account_code_prefix': '53',
'transfer_account_code_prefix': '58',
'account_default_pos_receivable_account_id': 'l10n_dz_412',
'income_currency_exchange_account_id': 'l10n_dz_766',
'expense_currency_exchange_account_id': 'l10n_dz_666',
'account_journal_early_pay_discount_loss_account_id': 'l10n_dz_709',
'account_journal_early_pay_discount_gain_account_id': 'l10n_dz_609',
'default_cash_difference_income_account_id': 'l10n_dz_758',
'default_cash_difference_expense_account_id': 'l10n_dz_657',
},
}