From 048527e75763b5c28fcda7cd01a99f1e9058429e Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 19 Sep 2011 11:36:26 +0200 Subject: [PATCH] [IMP] ir/wizard: removed the unused create_action wizard. bzr revid: vmt@openerp.com-20110919093626-guayq71dbbkmdn90 --- openerp/addons/base/ir/wizard/__init__.py | 1 - .../addons/base/ir/wizard/create_action.py | 77 ------------------- .../base/ir/wizard/wizard_menu_view.xml | 7 -- 3 files changed, 85 deletions(-) delete mode 100644 openerp/addons/base/ir/wizard/create_action.py diff --git a/openerp/addons/base/ir/wizard/__init__.py b/openerp/addons/base/ir/wizard/__init__.py index 99c6cdcd0de..3f5495524f5 100644 --- a/openerp/addons/base/ir/wizard/__init__.py +++ b/openerp/addons/base/ir/wizard/__init__.py @@ -20,6 +20,5 @@ ############################################################################## import wizard_menu import wizard_screen -import create_action # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/addons/base/ir/wizard/create_action.py b/openerp/addons/base/ir/wizard/create_action.py deleted file mode 100644 index 335f7a5ce04..00000000000 --- a/openerp/addons/base/ir/wizard/create_action.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - ############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 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 -import time - -action_type = ''' -
- -''' - -action_type_fields = { - 'type': {'string':"Select Action Type",'type':'selection','required':True ,'selection':[('ir.actions.report.xml','Open Report')]}, -} - -report_action = ''' -
- -''' - -report_action_fields = { - 'report': {'string':"Select Report",'type':'many2one','relation':'ir.actions.report.xml', 'required':True}, -} - -class create_action(wizard.interface): - - def _create_report_action(self, cr, uid, data, context={}): - pool = pooler.get_pool(cr.dbname) - - reports = pool.get('ir.actions.report.xml') - form = data['form'] - - rpt = reports.browse(cr, uid, form['report']) - - action = """action = {"type": "ir.actions.report.xml","model":"%s","report_name": "%s","ids": context["active_ids"]}""" % (rpt.model, rpt.report_name) - - obj = pool.get('ir.actions.server') - obj.write(cr, uid, data['ids'], {'code':action}) - - return {} - - states = { - 'init': { - 'actions': [], - 'result': {'type':'form', 'arch':action_type,'fields':action_type_fields, 'state':[('step_1','Next'),('end','Close')]} - }, - 'step_1': { - 'actions': [], - 'result': {'type':'form', 'arch':report_action,'fields':report_action_fields, 'state':[('create','Create'),('end','Close')]} - }, - 'create': { - 'actions': [_create_report_action], - 'result': {'type':'state', 'state':'end'} - }, - } -create_action('server.action.create') - - diff --git a/openerp/addons/base/ir/wizard/wizard_menu_view.xml b/openerp/addons/base/ir/wizard/wizard_menu_view.xml index 4d3e7e7a26e..d99138d00e6 100644 --- a/openerp/addons/base/ir/wizard/wizard_menu_view.xml +++ b/openerp/addons/base/ir/wizard/wizard_menu_view.xml @@ -21,12 +21,5 @@
-