[IMP] l10n_generic_coa: improve chart

Renamed xml ids of the main accounts (in prepartion for a future multi l10n
demo system). Change account numbering to match quickbook and other US GAAP
convention and recommendations.

closes odoo/odoo#37606

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
Antony Lesuisse
2019-10-01 13:09:50 +00:00
committed by oco-odoo
parent 3bca1d52a0
commit 4ddce229c4
10 changed files with 143 additions and 152 deletions
@@ -86,11 +86,11 @@ Tour.register('bank_statement_reconciliation', {
{
content: "enter an account",
trigger: '.o_reconciliation_line:nth-child(2) .o_field_many2one[name="account_id"] input',
run: 'text 100000'
run: 'text 151000'
},
{
content: "select the first account",
trigger: '.ui-autocomplete:visible li:last:contains(100000)',
trigger: '.ui-autocomplete:visible li:last:contains(151000)',
},
{
content: "reconcile the line with the write-off",
+2 -5
View File
@@ -15,12 +15,9 @@ Install some generic chart of accounts.
'account',
],
'data': [
'data/account_data.xml',
'data/l10n_generic_coa_chart_data.xml',
'data/l10n_generic_coa.xml',
'data/account.account.template.csv',
'data/l10n_generic_coa_chart_post_data.xml',
'data/account_tax_template_data.xml',
'data/account_chart_template_data.xml',
'data/l10n_generic_coa_post.xml',
],
'demo': [
'demo/account_bank_statement_demo.xml',
@@ -1,29 +1,33 @@
"id","name","code","user_type_id/id","chart_template_id/id","tag_ids/id","reconcile"
"conf_xfa","Fixed Asset Account","1000","account.data_account_type_fixed_assets","l10n_generic_coa.configurable_chart_template","","False"
"conf_stk","Current Assets","1010","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"conf_cas","Stock Valuation Account","10111","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"conf_cas_interim1","Stock Interim Account (Received)","10112","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","True"
"conf_cas_interim2","Stock Interim Account (Delivered)","10113","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","True"
"conf_a_recv","Account Receivable","1012","account.data_account_type_receivable","l10n_generic_coa.configurable_chart_template","","True"
"conf_ova","Tax Paid","1013","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"conf_o_income","Opening Income Account","1016","account.data_account_type_other_income","l10n_generic_coa.configurable_chart_template","","False"
"conf_ncas","Non-current assets","1020","account.data_account_type_non_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"conf_prepayments","Prepayments","1030","account.data_account_type_prepayments","l10n_generic_coa.configurable_chart_template","","False"
"current_liabilities","Current Liabilities","1110","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"conf_a_pay","Account Payable","1111","account.data_account_type_payable","l10n_generic_coa.configurable_chart_template","","True"
"conf_iva","Tax Received","1112","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"conf_a_reserve_and_surplus","Reserve and Profit/Loss Account","1113","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","True"
"cas","Non-current Liabilities","1120","account.data_account_type_non_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"conf_a_sale","Product Sales","200","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"exchange_fx_income","Foreign Exchange Gain","2010","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"cash_diff_income","Cash Difference Gain","2020","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"conf_cog","Cost of Goods Sold","210","account.data_account_type_direct_costs","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"exchange_fx_expense","Foreign Exchange Loss","2110","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"cash_diff_expense","Cash Difference Loss","2120","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"a_salary_expense","Salary Expenses","2121","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"a_expense_invest","Purchase of Equipments","2122","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"a_expense_finance","Bank Fees","2123","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"conf_a_expense","Expenses","220","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"a_capital","Capital","3001","account.data_account_type_equity","l10n_generic_coa.configurable_chart_template","","False"
"a_dividends","Dividends","3002","account.data_account_type_equity","l10n_generic_coa.configurable_chart_template","","False"
"pos_receivable","Account Receivable (PoS)","101210","account.data_account_type_receivable","l10n_generic_coa.configurable_chart_template","","True"
"current_assets","Current Assets","1010","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"stock_valuation","Stock Valuation","1101","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"stock_in","Stock Interim (Received)","1102","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","True"
"stock_out","Stock Interim (Delivered)","1103","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","True"
"receivable","Account Receivable","1210","account.data_account_type_receivable","l10n_generic_coa.configurable_chart_template","","True"
"tax_paid","Tax Paid","1310","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"tax_receivable","Tax Receivable","1320","account.data_account_type_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"prepayments","Prepayments","1410","account.data_account_type_prepayments","l10n_generic_coa.configurable_chart_template","","False"
"fixed_assets","Fixed Asset","1510","account.data_account_type_fixed_assets","l10n_generic_coa.configurable_chart_template","","False"
"non_current_assets","Non-current assets","1910","account.data_account_type_non_current_assets","l10n_generic_coa.configurable_chart_template","","False"
"current_liabilities","Current Liabilities","2010","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"payable","Account Payable","2110","account.data_account_type_payable","l10n_generic_coa.configurable_chart_template","","True"
"tax_received","Tax Received","2510","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"tax_payable","Tax Payable","2520","account.data_account_type_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"non_current_liabilities","Non-current Liabilities","2910","account.data_account_type_non_current_liabilities","l10n_generic_coa.configurable_chart_template","","False"
"capital","Capital","3010","account.data_account_type_equity","l10n_generic_coa.configurable_chart_template","","False"
"dividends","Dividends","3020","account.data_account_type_equity","l10n_generic_coa.configurable_chart_template","","False"
"income","Product Sales","4000","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"income_currency_exchange","Foreign Exchange Gain","4410","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"cash_diff_income","Cash Difference Gain","4420","account.data_account_type_revenue","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"other_income","Other Income","4500","account.data_account_type_other_income","l10n_generic_coa.configurable_chart_template","","False"
"cost_of_goods_sold","Cost of Goods Sold","5000","account.data_account_type_direct_costs","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"expense","Expenses","6000","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"expense_invest","Purchase of Equipments","6110","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"expense_rent","Rent","6120","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"expense_finance","Bank Fees","6200","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"expense_salary","Salary Expenses","6300","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False"
"expense_currency_exchange","Foreign Exchange Loss","6410","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False"
"cash_diff_expense","Cash Difference Loss","6420","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"expense_rd","RD Expenses","9610","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"expense_sales","Sales Expenses","9620","account.data_account_type_expenses","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False"
"pos_receivable","Account Receivable (PoS)","1013","account.data_account_type_receivable","l10n_generic_coa.configurable_chart_template","","True"
1 id name code user_type_id/id chart_template_id/id tag_ids/id reconcile
2 conf_xfa current_assets Fixed Asset Account Current Assets 1000 1010 account.data_account_type_fixed_assets account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template False
3 conf_stk stock_valuation Current Assets Stock Valuation 1010 1101 account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template False
4 conf_cas stock_in Stock Valuation Account Stock Interim (Received) 10111 1102 account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template False True
5 conf_cas_interim1 stock_out Stock Interim Account (Received) Stock Interim (Delivered) 10112 1103 account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template True
6 conf_cas_interim2 receivable Stock Interim Account (Delivered) Account Receivable 10113 1210 account.data_account_type_current_assets account.data_account_type_receivable l10n_generic_coa.configurable_chart_template True
7 conf_a_recv tax_paid Account Receivable Tax Paid 1012 1310 account.data_account_type_receivable account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template True False
8 conf_ova tax_receivable Tax Paid Tax Receivable 1013 1320 account.data_account_type_current_assets l10n_generic_coa.configurable_chart_template False
9 conf_o_income prepayments Opening Income Account Prepayments 1016 1410 account.data_account_type_other_income account.data_account_type_prepayments l10n_generic_coa.configurable_chart_template False
10 conf_ncas fixed_assets Non-current assets Fixed Asset 1020 1510 account.data_account_type_non_current_assets account.data_account_type_fixed_assets l10n_generic_coa.configurable_chart_template False
11 conf_prepayments non_current_assets Prepayments Non-current assets 1030 1910 account.data_account_type_prepayments account.data_account_type_non_current_assets l10n_generic_coa.configurable_chart_template False
12 current_liabilities Current Liabilities 1110 2010 account.data_account_type_current_liabilities l10n_generic_coa.configurable_chart_template False
13 conf_a_pay payable Account Payable 1111 2110 account.data_account_type_payable l10n_generic_coa.configurable_chart_template True
14 conf_iva tax_received Tax Received 1112 2510 account.data_account_type_current_liabilities l10n_generic_coa.configurable_chart_template False
15 conf_a_reserve_and_surplus tax_payable Reserve and Profit/Loss Account Tax Payable 1113 2520 account.data_account_type_current_liabilities l10n_generic_coa.configurable_chart_template True False
16 cas non_current_liabilities Non-current Liabilities 1120 2910 account.data_account_type_non_current_liabilities l10n_generic_coa.configurable_chart_template False
17 conf_a_sale capital Product Sales Capital 200 3010 account.data_account_type_revenue account.data_account_type_equity l10n_generic_coa.configurable_chart_template account.account_tag_operating False
18 exchange_fx_income dividends Foreign Exchange Gain Dividends 2010 3020 account.data_account_type_revenue account.data_account_type_equity l10n_generic_coa.configurable_chart_template account.account_tag_financing False
19 cash_diff_income income Cash Difference Gain Product Sales 2020 4000 account.data_account_type_revenue l10n_generic_coa.configurable_chart_template account.account_tag_investing account.account_tag_operating False
20 conf_cog income_currency_exchange Cost of Goods Sold Foreign Exchange Gain 210 4410 account.data_account_type_direct_costs account.data_account_type_revenue l10n_generic_coa.configurable_chart_template account.account_tag_operating account.account_tag_financing False
21 exchange_fx_expense cash_diff_income Foreign Exchange Loss Cash Difference Gain 2110 4420 account.data_account_type_expenses account.data_account_type_revenue l10n_generic_coa.configurable_chart_template account.account_tag_financing account.account_tag_investing False
22 cash_diff_expense other_income Cash Difference Loss Other Income 2120 4500 account.data_account_type_expenses account.data_account_type_other_income l10n_generic_coa.configurable_chart_template account.account_tag_investing False
23 a_salary_expense cost_of_goods_sold Salary Expenses Cost of Goods Sold 2121 5000 account.data_account_type_expenses account.data_account_type_direct_costs l10n_generic_coa.configurable_chart_template account.account_tag_operating False
24 a_expense_invest expense Purchase of Equipments Expenses 2122 6000 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_investing account.account_tag_operating False
25 a_expense_finance expense_invest Bank Fees Purchase of Equipments 2123 6110 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_financing account.account_tag_investing False
26 conf_a_expense expense_rent Expenses Rent 220 6120 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_operating account.account_tag_investing False
27 a_capital expense_finance Capital Bank Fees 3001 6200 account.data_account_type_equity account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_financing False
28 a_dividends expense_salary Dividends Salary Expenses 3002 6300 account.data_account_type_equity account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_operating False
29 pos_receivable expense_currency_exchange Account Receivable (PoS) Foreign Exchange Loss 101210 6410 account.data_account_type_receivable account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_financing True False
30 cash_diff_expense Cash Difference Loss 6420 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_investing False
31 expense_rd RD Expenses 9610 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_investing False
32 expense_sales Sales Expenses 9620 account.data_account_type_expenses l10n_generic_coa.configurable_chart_template account.account_tag_investing False
33 pos_receivable Account Receivable (PoS) 1013 account.data_account_type_receivable l10n_generic_coa.configurable_chart_template True
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_generic_coa.configurable_chart_template')]"/>
</function>
</data>
</odoo>
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Account Tax Group -->
<record id="tax_group_15" model="account.tax.group">
<field name="name">Tax 15%</field>
</record>
</data>
</odoo>
@@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- Tax template for sale and purchase -->
<record id="sale_tax_template" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">Tax 15%</field>
<field name="amount">15</field>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_15"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('conf_iva'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('conf_iva'),
}),
]"/>
</record>
<record id="purchase_tax_template" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">Purchase Tax 15%</field>
<field name="amount">15</field>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_15"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('conf_ova'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('conf_ova'),
}),
]"/>
</record>
</odoo>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- Account Tax Group -->
<record id="configurable_chart_template" model="account.chart.template">
<field name="name">Configurable Account Chart Template</field>
<field name="code_digits">6</field>
<field name="bank_account_code_prefix">1014</field>
<field name="cash_account_code_prefix">1015</field>
<field name="transfer_account_code_prefix">1017</field>
<field name="currency_id" ref="base.USD"/>
</record>
</odoo>
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="configurable_chart_template" model="account.chart.template">
<field name="name">Configurable Account Chart Template</field>
<field name="code_digits">6</field>
<field name="bank_account_code_prefix">1014</field>
<field name="cash_account_code_prefix">1015</field>
<field name="transfer_account_code_prefix">1017</field>
<field name="currency_id" ref="base.USD"/>
</record>
</data>
</odoo>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="configurable_chart_template" model="account.chart.template">
<field name="property_account_receivable_id" ref="conf_a_recv"/>
<field name="property_account_payable_id" ref="conf_a_pay"/>
<field name="property_account_expense_categ_id" ref="conf_a_expense"/>
<field name="property_account_income_categ_id" ref="conf_a_sale"/>
<field name="complete_tax_set" eval="False"/>
<field name="use_anglo_saxon" eval="True"/>
<field name="property_stock_account_input_categ_id" ref="conf_cas_interim1"/>
<field name="property_stock_account_output_categ_id" ref="conf_cas_interim2"/>
<field name="property_stock_valuation_account_id" ref="conf_cas"/>
<field name="income_currency_exchange_account_id" ref="exchange_fx_income"/>
<field name="expense_currency_exchange_account_id" ref="exchange_fx_expense"/>
<field name="default_cash_difference_income_account_id" ref="cash_diff_income"/>
<field name="default_cash_difference_expense_account_id" ref="cash_diff_expense"/>
<field name="default_pos_receivable_account_id" ref="pos_receivable"/>
</record>
</odoo>
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<!-- Chart template account links -->
<record id="configurable_chart_template" model="account.chart.template">
<field name="complete_tax_set" eval="False"/>
<field name="use_anglo_saxon" eval="True"/>
<field name="property_account_receivable_id" ref="receivable"/>
<field name="property_account_payable_id" ref="payable"/>
<field name="property_account_expense_categ_id" ref="expense"/>
<field name="property_account_income_categ_id" ref="income"/>
<field name="property_stock_account_input_categ_id" ref="stock_in"/>
<field name="property_stock_account_output_categ_id" ref="stock_out"/>
<field name="property_stock_valuation_account_id" ref="stock_valuation"/>
<field name="income_currency_exchange_account_id" ref="income_currency_exchange"/>
<field name="expense_currency_exchange_account_id" ref="expense_currency_exchange"/>
<field name="default_cash_difference_income_account_id" ref="cash_diff_income"/>
<field name="default_cash_difference_expense_account_id" ref="cash_diff_expense"/>
<field name="default_pos_receivable_account_id" ref="pos_receivable"/>
</record>
<!-- Tax template for sale and purchase -->
<record id="tax_group_15" model="account.tax.group">
<field name="name">Tax 15%</field>
</record>
<record id="sale_tax_template" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">Tax 15%</field>
<field name="amount">15</field>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_15"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('tax_received'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('tax_received'),
}),
]"/>
</record>
<record id="purchase_tax_template" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">Purchase Tax 15%</field>
<field name="amount">15</field>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_15"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('tax_paid'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('tax_paid'),
}),
]"/>
</record>
<!-- Try to instanciate for relevant companies -->
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_generic_coa.configurable_chart_template')]"/>
</function>
</odoo>