Improvement menu name from wizard

bzr revid: fp@tinyerp.com-193ae8a4ac1c8f8a2957dcd0df8551ee5ac45c04
This commit is contained in:
Fabien Pinckaers
2008-07-01 16:03:17 +00:00
parent 4bb0246a56
commit 75f9e53b97
+6
View File
@@ -475,6 +475,12 @@ form: module.record_id""" % (xml_id,)
values['icon'] = 'STOCK_EXECUTE'
if not values.get('name', False):
values['name'] = action_name
elif a_type=='act_wizard':
a_id = self.id_get(cr, 'ir.actions.%s'% a_type, a_action)
cr.execute('select name from ir_act_wizard where id=%d', (int(a_id),))
resw = cr.fetchone()
if (not values.get('name', False)) and resw:
values['name'] = resw[0]
if rec.hasAttribute('sequence'):
values['sequence'] = int(rec.getAttribute('sequence'))
if rec.hasAttribute('icon'):