diff options
| author | Harshad Modi <hmo@tinyerp.com> | 2008-06-25 11:57:29 +0000 |
|---|---|---|
| committer | Harshad Modi <hmo@tinyerp.com> | 2008-06-25 11:57:29 +0000 |
| commit | a3fccdb1fe3f3cd2f539cb5f1088e5a18a0abb02 (patch) | |
| tree | 4131c1ec22a11febfd3bc1d44265f3cf1b50cc65 /bin/addons/base/module | |
| parent | aa7fcf5188159cd1427c9d4a0c8bd3ffca9eed65 (diff) | |
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
Diffstat (limited to 'bin/addons/base/module')
| -rw-r--r-- | bin/addons/base/module/module.py | 30 | ||||
| -rw-r--r-- | bin/addons/base/module/module_view.xml | 37 |
2 files changed, 52 insertions, 15 deletions
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'] diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml index 2808a76d577..3576b48fcf3 100644 --- a/bin/addons/base/module/module_view.xml +++ b/bin/addons/base/module/module_view.xml @@ -212,6 +212,19 @@ </tree> </field> </record> + <record model="ir.ui.view" id="config_wizard_step_view_form"> + <field name="model">ir.module.module.configuration.step</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Config Wizard Steps" editable="bottom"> + <field name="name" select="1"/> + <field name="action_id" select="1"/> + <field name="sequence"/> + <field name="state"/> + <field name="note" colspan="4"/> + </form> + </field> + </record> <record model="ir.actions.act_window" id="act_config_wizard_step_form"> <field name="name">Config Wizard Steps</field> <field name="res_model">ir.module.module.configuration.step</field> @@ -223,18 +236,24 @@ id="menu_config_wizard_step_form"/> <record model="ir.ui.view" id="view_config_wizard_form"> - <field name="name">Main Configuration wizard</field> + <field name="name">Main Configuration Wizard</field> <field name="model">ir.module.module.configuration.wizard</field> <field name="type">form</field> <field name="arch" type="xml"> - <form string="Main Configuration wizard"> - <separator string="Main Configuration wizard" colspan="4" col="4"/> - <newline/> - <field name="item_id" select="1"/> - <group colspan="4" col="4"> - <button special="cancel" string="Cancel" /> - <button name="button_skip" type='object' string="Skip" /> - <button name="button_continue" type='object' string="Continue"/> + <form string="Next Configuration Step"> + <group colspan="4"> + <separator string="Next Configuration Step"/> + <newline/> + <field name="name" nolabel="1"/> + </group> + <separator string="" colspan="4"/> + <newline/> + <group colspan="2"> + </group> + <group colspan="2"> + <button special="cancel" colspan="1" string="Cancel" icon="gtk-cancel" /> + <!--<button name="button_skip" type='object' string="Skip" icon="gtk-ok"/>--> + <button name="button_continue" size="1" type='object' string="Continue" icon="gtk-go-forward"/> </group> </form> </field> |
