Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6777 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 3 25
32571
1
thg 12 22
15811
2
thg 12 22
6855
4
thg 8 24
28953
1
thg 4 16
5402