From c5cd83284de8d79589bb6340bbaf742cf1a41098 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Thu, 3 May 2012 16:06:45 +0530 Subject: [PATCH] [IMP] Account: improve code for chart of account wizard bzr revid: jap@tinyerp.com-20120503103645-atid3qv10o12ijnj --- addons/account/__openerp__.py | 3 +++ addons/account/{ => data}/configurable_account_chart.xml | 0 addons/account/installer.py | 5 ----- 3 files changed, 3 insertions(+), 5 deletions(-) rename addons/account/{ => data}/configurable_account_chart.xml (100%) diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index fba1bd8736f..764d9410d43 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -136,6 +136,9 @@ module named account_voucher. 'demo/account_invoice_demo.xml', # 'account_unit_test.xml', ], + 'data_xml':['data/configurable_account_chart.xml' + ], + 'test': [ 'test/account_customer_invoice.yml', 'test/account_supplier_invoice.yml', diff --git a/addons/account/configurable_account_chart.xml b/addons/account/data/configurable_account_chart.xml similarity index 100% rename from addons/account/configurable_account_chart.xml rename to addons/account/data/configurable_account_chart.xml diff --git a/addons/account/installer.py b/addons/account/installer.py index f0111d6645a..dc072787f96 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -123,11 +123,6 @@ class account_installer(osv.osv_memory): context = {} fy_obj = self.pool.get('account.fiscalyear') for res in self.read(cr, uid, ids, context=context): - if 'charts' in res and res['charts'] == 'configurable': - #load generic chart of account - fp = tools.file_open(opj('account', 'configurable_account_chart.xml')) - tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None) - fp.close() if 'date_start' in res and 'date_stop' in res: f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) if not f_ids: