wizard actions now store the linked model

bzr revid: christophe@tinyerp.com-20081008141208-m433cr857z9bi3ys
This commit is contained in:
Christophe Simonis 2008-10-08 16:12:08 +02:00
parent 660d6b3f94
commit b9c0637839
2 changed files with 5 additions and 2 deletions

View File

@ -251,7 +251,8 @@ class act_wizard(osv.osv):
'type': fields.char('Action type', size=32, required=True),
'wiz_name': fields.char('Wizard name', size=64, required=True),
'multi': fields.boolean('Action on multiple doc.', help="If set to true, the wizard will not be displayed on the right toolbar of a form views."),
'groups_id': fields.many2many('res.groups', 'res_groups_wizard_rel', 'uid', 'gid', 'Groups')
'groups_id': fields.many2many('res.groups', 'res_groups_wizard_rel', 'uid', 'gid', 'Groups'),
'model': fields.char('Object', size=64),
}
_defaults = {
'type': lambda *a: 'ir.actions.wizard',
@ -708,3 +709,5 @@ class ir_actions_configuration_wizard(osv.osv_memory):
return {'type':'ir.actions.act_window_close' }
ir_actions_configuration_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -308,7 +308,7 @@ form: module.record_id""" % (xml_id,)
xml_id = rec.getAttribute('id').encode('utf8')
self._test_xml_id(xml_id)
multi = rec.hasAttribute('multi') and eval(rec.getAttribute('multi'))
res = {'name': string, 'wiz_name': name, 'multi':multi}
res = {'name': string, 'wiz_name': name, 'multi': multi, 'model': model}
if rec.hasAttribute('groups'):
g_names = rec.getAttribute('groups').split(',')