[IMP] Account: improve code for chart of account wizard

bzr revid: jap@tinyerp.com-20120503103645-atid3qv10o12ijnj
This commit is contained in:
Jagdish Panchal (Open ERP) 2012-05-03 16:06:45 +05:30
parent 600cd72161
commit c5cd83284d
3 changed files with 3 additions and 5 deletions

View File

@ -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',

View File

@ -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: