Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Delete / reset US Chart of Account changes, remove duplicate account types

By
Ray Carnes
on 7/18/15, 11:28 AM 1,104 views

After installing the US Chart of Accounts, I now have duplicate Account Types for things like Cash, Expense, Receivable, etc.

I uninstalled the module, but these entries still remain.  I can't delete them because they are linked to accounts in my chart.  

I have no transactions, so I'd like to clean this up before making sales and purchases.

0

Ray Carnes

--Ray Carnes--
15677
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 7/18/15, 11:32 AM

1. Reinstall the US Chart of Accounts.

2. Run these SQL statements to reassign any accounts back to the defaults from the Configurable Chart and delete the types from the US Chart:

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_cash') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_cash'); 

DELETE from account_fiscal_position_template a using ir_model_data i where a.id = i.res_id and i.model = 'account.fiscal.position.template' and i.module = 'l10n_us';

DELETE from account_tax_template a using ir_model_data i where a.id = i.res_id and i.model = 'account.tax.template' and i.module = 'l10n_us';

DELETE from account_chart_template a using ir_model_data i where a.id = i.res_id and i.model = 'account.chart.template' and i.module = 'l10n_us';

DELETE from account_account_template a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.template' and i.module = 'l10n_us';

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_cash';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='conf_account_type_equity') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_equity');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_equity';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_expense') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_expense');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_expense';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_income') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_income');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_income';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_income') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_income');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_income';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_liability') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_liability');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_liability';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_payable') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_account_payable');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_account_payable';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_receivable') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_account_receivable');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_account_receivable';

UPDATE account_account set user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'account' and i.name='data_account_type_bank') where user_type = (select a.id from account_account_type a,ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_credit_card');

DELETE from account_account_type a using ir_model_data i where a.id = i.res_id and i.model = 'account.account.type' and i.module = 'l10n_us' and i.name='user_type_credit_card';


3. Uninstall the US Chart of Accounts.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/18/15, 11:28 AM
Seen: 1104 times
Last updated: 7/18/15, 11:32 AM