Modifs for menu wizards icons
bzr revid: fp@tinyerp.com-35ac891b0c74187970f620a6991d688b2b2c5ead
This commit is contained in:
@@ -455,8 +455,8 @@ form: module.record_id""" % (xml_id,)
|
||||
values['icon'] = icons.get(a_type,'STOCK_NEW')
|
||||
if a_type=='act_window':
|
||||
a_id = self.id_get(cr, 'ir.actions.%s'% a_type, a_action)
|
||||
cr.execute('select view_type,view_mode,name,view_id from ir_act_window where id=%d', (int(a_id),))
|
||||
action_type,action_mode,action_name,view_id = cr.fetchone()
|
||||
cr.execute('select view_type,view_mode,name,view_id,target from ir_act_window where id=%d', (int(a_id),))
|
||||
action_type,action_mode,action_name,view_id,target = cr.fetchone()
|
||||
if view_id:
|
||||
cr.execute('SELECT type FROM ir_ui_view WHERE id=%d', (int(view_id),))
|
||||
action_mode, = cr.fetchone()
|
||||
@@ -471,6 +471,8 @@ form: module.record_id""" % (xml_id,)
|
||||
values['icon'] = 'terp-graph'
|
||||
elif action_mode and action_mode.startswith('calendar'):
|
||||
values['icon'] = 'terp-calendar'
|
||||
if target=='new':
|
||||
values['icon'] = 'STOCK_EXECUTE'
|
||||
if not values.get('name', False):
|
||||
values['name'] = action_name
|
||||
if rec.hasAttribute('sequence'):
|
||||
|
||||
Reference in New Issue
Block a user