diff --git a/addons/account/static/tests/tours/reconciliation.js b/addons/account/static/tests/tours/reconciliation.js index 6566c55e09f98a8946e1e8da15879a1921d17fb9..f100e0d1a0e4291ab8260f963966e67e1f2cfe7d 100644 --- a/addons/account/static/tests/tours/reconciliation.js +++ b/addons/account/static/tests/tours/reconciliation.js @@ -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", diff --git a/addons/l10n_generic_coa/__manifest__.py b/addons/l10n_generic_coa/__manifest__.py index a2f8237d375a3fe80aa330d12045522bfe491a4c..19d5daa92ae542ffe56de4b99ee538415e33552d 100644 --- a/addons/l10n_generic_coa/__manifest__.py +++ b/addons/l10n_generic_coa/__manifest__.py @@ -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', diff --git a/addons/l10n_generic_coa/data/account.account.template.csv b/addons/l10n_generic_coa/data/account.account.template.csv index 88c9b949a43a1ac8058e7ee7d449687c22af6fe2..5d7b60102290f77fd963d1662b31a0c67c1325df 100644 --- a/addons/l10n_generic_coa/data/account.account.template.csv +++ b/addons/l10n_generic_coa/data/account.account.template.csv @@ -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" diff --git a/addons/l10n_generic_coa/data/account_chart_template_data.xml b/addons/l10n_generic_coa/data/account_chart_template_data.xml deleted file mode 100644 index c3309d4673585f462c4e6d3d8224a633b16a0608..0000000000000000000000000000000000000000 --- a/addons/l10n_generic_coa/data/account_chart_template_data.xml +++ /dev/null @@ -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> diff --git a/addons/l10n_generic_coa/data/account_data.xml b/addons/l10n_generic_coa/data/account_data.xml deleted file mode 100644 index 48fcd5679095bbaee1cc142d807e6023b1d93494..0000000000000000000000000000000000000000 --- a/addons/l10n_generic_coa/data/account_data.xml +++ /dev/null @@ -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> diff --git a/addons/l10n_generic_coa/data/account_tax_template_data.xml b/addons/l10n_generic_coa/data/account_tax_template_data.xml deleted file mode 100644 index c17dc8c73ac97c79d57367939621f457d79c272b..0000000000000000000000000000000000000000 --- a/addons/l10n_generic_coa/data/account_tax_template_data.xml +++ /dev/null @@ -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> diff --git a/addons/l10n_generic_coa/data/l10n_generic_coa.xml b/addons/l10n_generic_coa/data/l10n_generic_coa.xml new file mode 100644 index 0000000000000000000000000000000000000000..288d30423a55712c54e9bfb5192dcaacff680e34 --- /dev/null +++ b/addons/l10n_generic_coa/data/l10n_generic_coa.xml @@ -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> diff --git a/addons/l10n_generic_coa/data/l10n_generic_coa_chart_data.xml b/addons/l10n_generic_coa/data/l10n_generic_coa_chart_data.xml deleted file mode 100644 index 971aad455fea2c789597f19c96c4727be669e566..0000000000000000000000000000000000000000 --- a/addons/l10n_generic_coa/data/l10n_generic_coa_chart_data.xml +++ /dev/null @@ -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> diff --git a/addons/l10n_generic_coa/data/l10n_generic_coa_chart_post_data.xml b/addons/l10n_generic_coa/data/l10n_generic_coa_chart_post_data.xml deleted file mode 100644 index 9340c492f8467bdbe898d71fafafa5cdd5f4978f..0000000000000000000000000000000000000000 --- a/addons/l10n_generic_coa/data/l10n_generic_coa_chart_post_data.xml +++ /dev/null @@ -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> diff --git a/addons/l10n_generic_coa/data/l10n_generic_coa_post.xml b/addons/l10n_generic_coa/data/l10n_generic_coa_post.xml new file mode 100644 index 0000000000000000000000000000000000000000..9b6217f1037d9e77fa87dd19d63fb67dead78d9c --- /dev/null +++ b/addons/l10n_generic_coa/data/l10n_generic_coa_post.xml @@ -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>