[IMP] account: installing a chart of account shouldn't remove the chart of demo data
bzr revid: qdp-launchpad@tinyerp.com-20100922143937-e4jt5m7aaibo1101
This commit is contained in:
parent
5fc2cfcb0d
commit
581a65d902
|
@ -2810,15 +2810,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
'position_id' : new_fp,
|
||||
}
|
||||
obj_ac_fp.create(cr, uid, vals_acc)
|
||||
|
||||
#fially inactive the demo chart of accounts
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')])
|
||||
if data_id:
|
||||
data = data_pool.browse(cr, uid, data_id[0])
|
||||
account_id = data.res_id
|
||||
acc_ids = obj_acc._get_children_and_consol(cr, uid, [account_id])
|
||||
if acc_ids:
|
||||
cr.execute("update account_account set active='f' where id in " + str(tuple(acc_ids)))
|
||||
wizard_multi_charts_accounts()
|
||||
|
||||
class account_bank_accounts_wizard(osv.osv_memory):
|
||||
|
|
Loading…
Reference in New Issue