diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index 3365a3d551e..d4731fa0215 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -97,6 +97,7 @@ module named account_voucherss
'project/wizard/account_analytic_inverted_balance_report.xml',
'project/wizard/account_analytic_journal_report_view.xml',
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
+ 'project/wizard/account_analytic_chart_view.xml',
'product_view.xml',
'account_assert_test.xml',
'process/statement_process.xml',
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index e0854f8d65d..a97be959cd1 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -127,8 +127,8 @@
parent="account_analytic_def_account"/>
-
-
+
diff --git a/addons/account/project/wizard/__init__.py b/addons/account/project/wizard/__init__.py
index 3e087c9daaf..60f591fcb55 100644
--- a/addons/account/project/wizard/__init__.py
+++ b/addons/account/project/wizard/__init__.py
@@ -26,6 +26,6 @@ import account_analytic_cost_ledger_report
import account_analytic_cost_ledger_for_journal_report
import account_analytic_check
import project_account_analytic_line
-import wizard_analytic_account_chart
+import account_analytic_chart
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account/project/wizard/account_analytic_chart.py b/addons/account/project/wizard/account_analytic_chart.py
new file mode 100644
index 00000000000..dc55d6c43e7
--- /dev/null
+++ b/addons/account/project/wizard/account_analytic_chart.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+from osv import osv, fields
+
+class account_analytic_chart(osv.osv_memory):
+ _name = 'account.analytic.chart'
+ _description = 'Account Analytic Chart'
+
+ _columns = {
+ 'from_date': fields.date('From'),
+ 'to_date': fields.date('To'),
+ }
+
+ def analytic_account_chart_open_window(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ act_obj = self.pool.get('ir.actions.act_window')
+ result_context = {}
+ if context is None:
+ context = {}
+ result = mod_obj._get_id(cr, uid, 'account', 'action_account_analytic_account_tree2')
+ id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
+ result = act_obj.read(cr, uid, [id], context=context)[0]
+ data = self.read(cr, uid, ids, [])[0]
+ if data['from_date']:
+ result_context.update({'from_date' : data['from_date']})
+ if data['to_date']:
+ result_context.update({'to_date' : data['to_date']})
+ result['context'] = str(result_context)
+ return result
+
+account_analytic_chart()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account/project/wizard/account_analytic_chart_view.xml b/addons/account/project/wizard/account_analytic_chart_view.xml
new file mode 100644
index 00000000000..cac1839712d
--- /dev/null
+++ b/addons/account/project/wizard/account_analytic_chart_view.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+ Account Analytic Chart
+ account.analytic.chart
+ form
+
+
+
+
+
+
+ Analytic Chart of Accounts
+ ir.actions.act_window
+ account.analytic.chart
+ form
+ form
+
+ new
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/account/project/wizard/wizard_analytic_account_chart.py b/addons/account/project/wizard/wizard_analytic_account_chart.py
deleted file mode 100644
index e011fad15bb..00000000000
--- a/addons/account/project/wizard/wizard_analytic_account_chart.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import wizard
-import pooler
-
-class wizard_analytic_account_chart(wizard.interface):
- _account_chart_arch = '''
- '''
-
- _account_chart_fields = {
- 'from_date': {
- 'string': 'From',
- 'type': 'date',
- },
- 'to_date': {
- 'string': 'To',
- 'type': 'date',
- },
- }
-
-
- def _analytic_account_chart_open_window(self, cr, uid, data, context):
- mod_obj = pooler.get_pool(cr.dbname).get('ir.model.data')
- act_obj = pooler.get_pool(cr.dbname).get('ir.actions.act_window')
-
- result = mod_obj._get_id(cr, uid, 'account', 'action_account_analytic_account_tree2')
- id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
- result = act_obj.read(cr, uid, [id], context=context)[0]
-
- result_context = {}
- if data['form']['from_date']:
- result_context.update({'from_date' : data['form']['from_date']})
- if data['form']['to_date']:
- result_context.update({'to_date' : data['form']['to_date']})
-
- result['context'] = str(result_context)
- return result
-
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type': 'form', 'arch':_account_chart_arch, 'fields':_account_chart_fields, 'state': [('end', 'Cancel', 'gtk-cancel'), ('open', 'Open Charts', 'gtk-ok')]}
- },
- 'open': {
- 'actions': [],
- 'result': {'type': 'action', 'action':_analytic_account_chart_open_window, 'state':'end'}
- }
- }
-wizard_analytic_account_chart('account.analytic.account.chart')
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-