From 00d0f3bbfff049c772f530122876d774da97e19c Mon Sep 17 00:00:00 2001 From: Hetashree Chauhan Date: Tue, 20 Nov 2018 13:15:38 +0000 Subject: [PATCH] [IMP] l10n_th: switch account.account.template creation in csv data creation is faster when done through a CSV file compared to an XML file. Hence doing it through a CSV This commit is related to task_id : 1909961. closes odoo/odoo#28893 --- addons/l10n_th/__manifest__.py | 3 + .../l10n_th/data/account.account.template.csv | 27 ++ .../data/account_tax_template_data.xml | 153 +++++++ addons/l10n_th/data/l10n_th_chart_data.xml | 376 ------------------ .../l10n_th/data/l10n_th_chart_post_data.xml | 11 + 5 files changed, 194 insertions(+), 376 deletions(-) create mode 100644 addons/l10n_th/data/account.account.template.csv create mode 100644 addons/l10n_th/data/account_tax_template_data.xml create mode 100644 addons/l10n_th/data/l10n_th_chart_post_data.xml diff --git a/addons/l10n_th/__manifest__.py b/addons/l10n_th/__manifest__.py index f14d8bae48c..d4c32b2c57f 100644 --- a/addons/l10n_th/__manifest__.py +++ b/addons/l10n_th/__manifest__.py @@ -17,6 +17,9 @@ Thai accounting chart and localization. 'data': [ 'data/account_data.xml', 'data/l10n_th_chart_data.xml', + 'data/account.account.template.csv', + 'data/l10n_th_chart_post_data.xml', + 'data/account_tax_template_data.xml', 'data/account_chart_template_data.xml', ], 'post_init_hook': '_preserve_tag_on_taxes', diff --git a/addons/l10n_th/data/account.account.template.csv b/addons/l10n_th/data/account.account.template.csv new file mode 100644 index 00000000000..150040ae723 --- /dev/null +++ b/addons/l10n_th/data/account.account.template.csv @@ -0,0 +1,27 @@ +"id","name","code","user_type_id/id","chart_template_id/id","reconcile" +"a_recv","Account Receivable","1200","account.data_account_type_receivable","l10n_th.chart","True" +"a_cheque","Outstanding Cheques","1201","account.data_account_type_current_liabilities","l10n_th.chart","True" +"a_invent","Inventory","1300","account.data_account_type_current_assets","l10n_th.chart","False" +"a_building_depr","Accumulated Depreciation - Building","1411","account.data_account_type_depreciation","l10n_th.chart","False" +"a_equipment_dept","Accumulated Depreciation - Equipment","1421","account.data_account_type_depreciation","l10n_th.chart","False" +"a_input_vat","Input VAT","1510","account.data_account_type_current_assets","l10n_th.chart","False" +"a_wht_income","Withholding Income Tax","1520","account.data_account_type_current_assets","l10n_th.chart","False" +"a_pay","Account Payable","2101","account.data_account_type_payable","l10n_th.chart","True" +"a_accr_exp","Accrued Expenses","2102","account.data_account_type_current_liabilities","l10n_th.chart","True" +"a_uninvoiced_receipts","Uninvoiced Receipts","2103","account.data_account_type_current_liabilities","l10n_th.chart","True" +"a_loan","Loans","2200","account.data_account_type_current_liabilities","l10n_th.chart","True" +"a_output_vat","Output VAT","2310","account.data_account_type_current_liabilities","l10n_th.chart","False" +"a_wht","Withholding Tax","2320","account.data_account_type_current_liabilities","l10n_th.chart","False" +"a_common_stock","Capital Stock","3100","account.data_account_type_equity","l10n_th.chart","False" +"a_retained_earnings","Retained Earnings","3200","account.data_account_type_equity","l10n_th.chart","False" +"a_dividends","Dividends","3300","account.data_account_type_equity","l10n_th.chart","False" +"a_income_summary","Income Summary","3400","account.data_account_type_equity","l10n_th.chart","False" +"a_sales","Income","4100","account.data_account_type_revenue","l10n_th.chart","False" +"a_income_gain","Gain Account","4200","account.data_account_type_other_income","l10n_th.chart","False" +"a_exp_cogs","Cost of Revenue","5100","account.data_account_type_direct_costs","l10n_th.chart","False" +"a_exp_salary","Salary","5201","account.data_account_type_expenses","l10n_th.chart","False" +"a_exp_rent","Rent","5202","account.data_account_type_expenses","l10n_th.chart","False" +"a_exp_office","Office Expenses","5203","account.data_account_type_expenses","l10n_th.chart","False" +"a_exp_interest","Interest expenses","5300","account.data_account_type_expenses","l10n_th.chart","False" +"a_exp_income_tax","Income tax expenses","5400","account.data_account_type_expenses","l10n_th.chart","False" +"a_exp_loss","Loss Account","5500","account.data_account_type_expenses","l10n_th.chart","False" diff --git a/addons/l10n_th/data/account_tax_template_data.xml b/addons/l10n_th/data/account_tax_template_data.xml new file mode 100644 index 00000000000..59dc0b7c14d --- /dev/null +++ b/addons/l10n_th/data/account_tax_template_data.xml @@ -0,0 +1,153 @@ + + + + + Input VAT + percent + + + + purchase + + + + + + Output VAT + percent + + + + sale + + + + + + Company Withholding Tax 1% (Transportation) + percent + + + + purchase + + + + + + Company Withholding Tax 2% (Advertising) + percent + + + + purchase + + + + + + Company Withholding Tax 3% (Service) + percent + + + + purchase + + + + + + Company Withholding Tax 5% (Rental) + percent + + + + purchase + + + + + + Personal Withholding Tax 1% (Transportation) + percent + + + + purchase + + + + + + Personal Withholding Tax 2% (Advertising) + percent + + + + purchase + + + + + + Personal Withholding Tax 3% (Service) + percent + + + + purchase + + + + + + Personal Withholding Tax 5% (Rental) + percent + + + + purchase + + + + + + Withholding Income Tax 1% (Transportation) + percent + + + + sale + + + + + Withholding Income Tax 2% (Advertising) + percent + + + + sale + + + + + Withholding Income Tax 3% (Service) + percent + + + + sale + + + + + Withholding Income Tax 5% (Rental) + percent + + + + sale + + + diff --git a/addons/l10n_th/data/l10n_th_chart_data.xml b/addons/l10n_th/data/l10n_th_chart_data.xml index b9bfefc6c13..30e9f8b8706 100644 --- a/addons/l10n_th/data/l10n_th_chart_data.xml +++ b/addons/l10n_th/data/l10n_th_chart_data.xml @@ -21,216 +21,6 @@ - - - - - 1200 - Account Receivable - - - - - - - 1201 - Outstanding Cheques - - - - - - - 1300 - Inventory - - - - - - 1411 - Accumulated Depreciation - Building - - - - - - 1421 - Accumulated Depreciation - Equipment - - - - - - 1510 - Input VAT - - - - - - 1520 - Withholding Income Tax - - - - - - - - 2101 - Account Payable - - - - - - - 2102 - Accrued Expenses - - - - - - - 2103 - Uninvoiced Receipts - - - - - - - 2200 - Loans - - - - - - - 2310 - Output VAT - - - - - - 2320 - Withholding Tax - - - - - - - - 3100 - Capital Stock - - - - - - 3200 - Retained Earnings - - - - - - 3300 - Dividends - - - - - - 3400 - Income Summary - - - - - - - - 4100 - Income - - - - - - 4200 - Gain Account - - - - - - - - 5100 - Cost of Revenue - - - - - - 5201 - Salary - - - - - - 5202 - Rent - - - - - - 5203 - Office Expenses - - - - - - 5300 - Interest expenses - - - - - - 5400 - Income tax expenses - - - - - - 5500 - Loss Account - - - - - - - - - - - - - - - @@ -321,170 +111,4 @@ Input VAT taxes - - - - - - Input VAT - percent - - - - purchase - - - - - - - Output VAT - percent - - - - sale - - - - - - - Company Withholding Tax 1% (Transportation) - percent - - - - purchase - - - - - - - Company Withholding Tax 2% (Advertising) - percent - - - - purchase - - - - - - - Company Withholding Tax 3% (Service) - percent - - - - purchase - - - - - - - Company Withholding Tax 5% (Rental) - percent - - - - purchase - - - - - - - Personal Withholding Tax 1% (Transportation) - percent - - - - purchase - - - - - - - Personal Withholding Tax 2% (Advertising) - percent - - - - purchase - - - - - - - Personal Withholding Tax 3% (Service) - percent - - - - purchase - - - - - - - Personal Withholding Tax 5% (Rental) - percent - - - - purchase - - - - - - - Withholding Income Tax 1% (Transportation) - percent - - - - sale - - - - - - Withholding Income Tax 2% (Advertising) - percent - - - - sale - - - - - - Withholding Income Tax 3% (Service) - percent - - - - sale - - - - - - Withholding Income Tax 5% (Rental) - percent - - - - sale - - diff --git a/addons/l10n_th/data/l10n_th_chart_post_data.xml b/addons/l10n_th/data/l10n_th_chart_post_data.xml new file mode 100644 index 00000000000..1fb728e96f6 --- /dev/null +++ b/addons/l10n_th/data/l10n_th_chart_post_data.xml @@ -0,0 +1,11 @@ + + + + + + + + + + +