Files
odoo_source/addons/l10n_tw/models/template_tw.py
T
Ruben Gomes (rugo) 7c05beaa89 [FIX] l10n_*: anglo saxon accounting
The anglo saxon accounting was set in the wrong field.

It should be set in the field 'anglo_saxon_accounting' on the company
and not 'use_anglo_saxon' on the configs.

task-3642826

closes odoo/odoo#149190

X-original-commit: 3160749a173b01e93f91dea72d1dcc5370ea44f7
Signed-off-by: William André (wan) <wan@odoo.com>
2024-01-16 09:55:24 +00:00

42 lines
1.8 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('tw')
def _get_tw_template_data(self):
return {
'code_digits': '6',
'property_account_receivable_id': 'tw_119100',
'property_account_payable_id': 'tw_217100',
'property_account_expense_categ_id': 'tw_511100',
'property_account_income_categ_id': 'tw_411100',
'property_stock_account_input_categ_id': 'tw_124500',
'property_stock_account_output_categ_id': 'tw_124600',
'property_stock_valuation_account_id': 'tw_123100',
}
@template('tw', 'res.company')
def _get_tw_res_company(self):
return {
self.env.company.id: {
'anglo_saxon_accounting': True,
'account_fiscal_country_id': 'base.tw',
'bank_account_code_prefix': '1113',
'cash_account_code_prefix': '1111',
'transfer_account_code_prefix': '1114',
'account_default_pos_receivable_account_id': 'tw_119150',
'income_currency_exchange_account_id': 'tw_718100',
'expense_currency_exchange_account_id': 'tw_718200',
'account_journal_early_pay_discount_loss_account_id': 'tw_411400',
'account_journal_early_pay_discount_gain_account_id': 'tw_512400',
'default_cash_difference_income_account_id': 'tw_718500',
'default_cash_difference_expense_account_id': 'tw_718600',
'account_sale_tax_id': 'tw_tax_sale_5',
'account_purchase_tax_id': 'tw_tax_purchase_5',
},
}