From 8e8cb549251b6914a34a729bb06c02462ed95af9 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Tue, 31 Aug 2010 10:40:55 +0530 Subject: [IMP]: convert old wizard into osv memory wizard for configuration bzr revid: ksa@tinyerp.co.in-20100831051055-4dhs0b8a1wqgwp2v --- .../module/wizard/base_module_configuration.py | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bin/addons/base/module/wizard/base_module_configuration.py (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py new file mode 100644 index 00000000000..2473136501d --- /dev/null +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -0,0 +1,34 @@ +# -*- 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 pooler +from osv import osv, fields + +class base_module_configuration(osv.osv_memory): + + _name = "base.module.configuration" + + def config(self, cr, uid, data, context=None): + return self.pool.get('res.config').next(cr, uid, [], context=context) + +base_module_configuration() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: -- cgit v1.2.3 From f7d18164af561bcd35149bae4a753a6f253e44b5 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 15 Sep 2010 19:15:34 +0530 Subject: [IMP,ADD]: base: Improvement in new osv memort configuration wizard bzr revid: rpa@tinyerp.com-20100915134534-ysdxskot66w3bqdz --- bin/addons/base/module/wizard/base_module_configuration.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py index 2473136501d..cb3a89eeb3e 100644 --- a/bin/addons/base/module/wizard/base_module_configuration.py +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -19,16 +19,5 @@ # ############################################################################## -import pooler -from osv import osv, fields - -class base_module_configuration(osv.osv_memory): - - _name = "base.module.configuration" - - def config(self, cr, uid, data, context=None): - return self.pool.get('res.config').next(cr, uid, [], context=context) - -base_module_configuration() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: -- cgit v1.2.3 From 05b270a9cf3c6f71a1db952d494b0a28cd496e9a Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 16 Sep 2010 17:59:27 +0530 Subject: [IMP]: base: Improvement in configuration wizard action, added view bzr revid: rpa@tinyerp.com-20100916122927-7yzlr8l8tftiw67d --- .../module/wizard/base_module_configuration.py | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py index cb3a89eeb3e..838b63eb457 100644 --- a/bin/addons/base/module/wizard/base_module_configuration.py +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -19,5 +19,33 @@ # ############################################################################## +from osv import osv +from tools.translate import _ + +class base_module_configuration(osv.osv_memory): + + _name = "base.module.configuration" + + def start(self, cr, uid, ids, context=None): + todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), ('restart', '=', 'always')]) + if not todo_ids: + # When there is no wizard todo it will display message + data_obj = self.pool.get('ir.model.data') + result = data_obj._get_id(cr, uid, 'base', 'view_base_module_configuration_form') + view_id = data_obj.browse(cr, uid, result).res_id + value = { + 'name': _('System Configuration done'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'base.module.configuration', + 'view_id': view_id, + 'type': 'ir.actions.act_window', + } + return value + # Run the config wizards + config_pool = self.pool.get('res.config') + return config_pool.start(cr, uid, ids, context=context) + +base_module_configuration() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: -- cgit v1.2.3 From 8ff7edf47d22387c3dcda89114c9863de8d3c1f0 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 22 Sep 2010 16:07:12 +0530 Subject: [REM,FIX]: * Removed old configuration wizard * Fix action when there is no config wizard to execute bzr revid: rpa@tinyerp.com-20100922103712-n217m5xjl4wptuku --- bin/addons/base/module/wizard/base_module_configuration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py index 838b63eb457..909637c1d21 100644 --- a/bin/addons/base/module/wizard/base_module_configuration.py +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -38,8 +38,9 @@ class base_module_configuration(osv.osv_memory): 'view_type': 'form', 'view_mode': 'form', 'res_model': 'base.module.configuration', - 'view_id': view_id, + 'view_id': [view_id], 'type': 'ir.actions.act_window', + 'target': 'new' } return value # Run the config wizards -- cgit v1.2.3 From 6dcdbe95b06384ef2ab3c49980acb5bb1a1a060b Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Mon, 27 Sep 2010 17:20:13 +0530 Subject: [IMP]: Improvement in domain to launch config wizard by wizard bzr revid: rpa@tinyerp.com-20100927115013-otj04tdu84e72tki --- bin/addons/base/module/wizard/base_module_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py index 909637c1d21..345ed9a9797 100644 --- a/bin/addons/base/module/wizard/base_module_configuration.py +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -27,7 +27,7 @@ class base_module_configuration(osv.osv_memory): _name = "base.module.configuration" def start(self, cr, uid, ids, context=None): - todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), ('restart', '=', 'always')]) + todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get('ir.model.data') -- cgit v1.2.3 From 4c1a9e61399655f34652dea50ee46a5bd5b5e6e1 Mon Sep 17 00:00:00 2001 From: fp Date: Sun, 10 Oct 2010 21:33:54 +0200 Subject: fix bzr revid: fp@fp-laptop-20101010193354-1azqu1646j4z6of7 --- bin/addons/base/module/wizard/base_module_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/addons/base/module/wizard/base_module_configuration.py') diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py index 345ed9a9797..866b22905e0 100644 --- a/bin/addons/base/module/wizard/base_module_configuration.py +++ b/bin/addons/base/module/wizard/base_module_configuration.py @@ -27,7 +27,7 @@ class base_module_configuration(osv.osv_memory): _name = "base.module.configuration" def start(self, cr, uid, ids, context=None): - todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) + todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get('ir.model.data') -- cgit v1.2.3