From a3fccdb1fe3f3cd2f539cb5f1088e5a18a0abb02 Mon Sep 17 00:00:00 2001 From: Harshad Modi Date: Wed, 25 Jun 2008 11:57:29 +0000 Subject: modification: * add icon on main configiration Steps and also all configuration wizards * add new field 'note' on configuration step object for step desection which is display on main configuration wizard * modify some configuration wizards : - configure user : add new button for loop , save + new - select simple view or extend view : modify layout - journal of bank account : put one2many object with editable tree view to allow create more than one journal bzr revid: hmo@tinyerp.com-6847618764e7199996115d04ccb6dac991b1438a --- bin/addons/base/module/module.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'bin/addons/base/module/module.py') diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index f2f4a456243..a49b47c44ac 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -574,7 +574,8 @@ class module_config_wizard_step(osv.osv): _name = 'ir.module.module.configuration.step' _columns={ - 'name':fields.char('Name', size=64, required=True, select=True), + 'name':fields.char('Name',size=64,required=True, select=True), + 'note':fields.text('Text'), 'action_id':fields.many2one('ir.actions.act_window', 'Action', select=True,required=True, ondelete='cascade'), 'sequence':fields.integer('Sequence'), 'state':fields.selection([('open', 'Open'),('done', 'Done'),('skip','Skip')], string='State', required=True) @@ -589,7 +590,22 @@ module_config_wizard_step() class module_configuration(osv.osv_memory): _name='ir.module.module.configuration.wizard' - def _get_wizard(self, cr, uid, context={}): + + def _get_action_name(self, cr, uid, context={}): + item_obj = self.pool.get('ir.module.module.configuration.step') + item_ids = item_obj.search(cr, uid, [ + ('state', '=', 'open'), + ], limit=1, context=context) + if item_ids and len(item_ids): + item = item_obj.browse(cr, uid, item_ids[0], context=context) + return item.note + else: + return 'Thank You! All Configuration steps are installed' + return False + + + + def _get_action(self, cr, uid, context={}): item_obj = self.pool.get('ir.module.module.configuration.step') item_ids = item_obj.search(cr, uid, [ ('state', '=', 'open'), @@ -600,13 +616,15 @@ class module_configuration(osv.osv_memory): return False _columns = { - 'name': fields.char('Next Wizard', size=64,readonly=True), - 'item_id':fields.many2one('ir.module.module.configuration.step', 'Next Configuration Wizard', readonly=True), + 'name': fields.text('Next Wizard',readonly=True), + 'item_id':fields.many2one('ir.module.module.configuration.step', 'Next Configuration Wizard',invisible=True, readonly=True), + } _defaults={ - 'item_id':_get_wizard - } + 'item_id':_get_action, + 'name':_get_action_name, + } def button_skip(self,cr,uid,ids,context=None): item_obj = self.pool.get('ir.module.module.configuration.step') item_id=self.read(cr,uid,ids)[0]['item_id'] -- cgit v1.2.3