From 84fc58f0452b2601764e3c3ded287e4b2d83e170 Mon Sep 17 00:00:00 2001 From: "ced@b2ck.com" Date: Sat, 29 Dec 2007 14:49:27 +0100 Subject: [PATCH] Better implementation of wizard - use WizardOSV object by state - Don't store xml view in the python code - Use code of fields_view_get for wizard view --- trytond/ir/module/module.py | 47 +++++++------ trytond/ir/module/module.xml | 23 +++++++ trytond/wizard/wizard.py | 124 +++++++++++++++++++++-------------- 3 files changed, 118 insertions(+), 76 deletions(-) diff --git a/trytond/ir/module/module.py b/trytond/ir/module/module.py index 6c6ec5946d..809559e6ee 100644 --- a/trytond/ir/module/module.py +++ b/trytond/ir/module/module.py @@ -7,7 +7,7 @@ from trytond.osv import fields, OSV import trytond.tools as tools from trytond.module import ADDONS_PATH from trytond.osv.orm import ExceptORM -from trytond.wizard import Wizard +from trytond.wizard import Wizard, WizardOSV VER_REGEXP = re.compile( "^(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?$") @@ -539,30 +539,29 @@ class ModuleDependency(OSV): ModuleDependency() +class ModuleUpdateListInit(WizardOSV): + _name = 'ir.module.module.update_list.init' + _columns = { + 'repositories': fields.Text('Repositories', readonly=True), + } + +ModuleUpdateListInit() + + +class ModuleUpdateListUpdate(WizardOSV): + _name = 'ir.module.module.update_list.update' + _columns = { + 'update': fields.Integer('Number of modules updated', readonly=True), + 'add': fields.Integer('Number of modules added', readonly=True), + } + +ModuleUpdateListUpdate() + + class ModuleUpdateList(Wizard): "Update module list" _name = 'ir.module.module.update_list' - arch = ''' -
-