Skip to content

Commit

Permalink
[IMP] l10n_generic_coa: improve chart
Browse files Browse the repository at this point in the history
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#37606

Signed-off-by: oco-odoo <[email protected]>
  • Loading branch information
antonylesuisse authored and oco-odoo committed Oct 1, 2019
1 parent 3bca1d5 commit 4ddce22
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 152 deletions.
4 changes: 2 additions & 2 deletions addons/account/static/tests/tours/reconciliation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 2 additions & 5 deletions addons/l10n_generic_coa/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
'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',
Expand Down
60 changes: 32 additions & 28 deletions addons/l10n_generic_coa/data/account.account.template.csv
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 0 additions & 8 deletions addons/l10n_generic_coa/data/account_chart_template_data.xml

This file was deleted.

9 changes: 0 additions & 9 deletions addons/l10n_generic_coa/data/account_data.xml

This file was deleted.

68 changes: 0 additions & 68 deletions addons/l10n_generic_coa/data/account_tax_template_data.xml

This file was deleted.

12 changes: 12 additions & 0 deletions addons/l10n_generic_coa/data/l10n_generic_coa.xml
Original file line number Diff line number Diff line change
@@ -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>
13 changes: 0 additions & 13 deletions addons/l10n_generic_coa/data/l10n_generic_coa_chart_data.xml

This file was deleted.

19 changes: 0 additions & 19 deletions addons/l10n_generic_coa/data/l10n_generic_coa_chart_post_data.xml

This file was deleted.

95 changes: 95 additions & 0 deletions addons/l10n_generic_coa/data/l10n_generic_coa_post.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 4ddce22

Please sign in to comment.