Hi everybody,
I have the following problem: from a wizard I want to open a specific form and 
a specific tree, not the default. I tried with the following code into the 
wizard:

name = data['form']['customer_name']
# retrieve ids of the form and tree
form_obj_id = 
pooler.get_pool(cr.dbname).get('ir.model.data').search(cr,uid,[('name','=','custom_form_partner_viewnew')])
form_res_id = 
pooler.get_pool(cr.dbname).get('ir.model.data').browse(cr,uid,form_obj_id[0]).res_id
tree_obj_id = 
pooler.get_pool(cr.dbname).get('ir.model.data').search(cr,uid,[('name','=','custom_tree_partner_viewnew')])
tree_res_id = 
pooler.get_pool(cr.dbname).get('ir.model.data').browse(cr,uid,tree_obj_id[0]).res_id

# open the view with the selected partner
return {
      'domain': [('name','ilike',name)],
      'name': 'Customer',
      'view_type': 'tree',
      ###### 'view_type': ('tree','form'),
      ###### 'view_mode': 'tree,form',
      'view_ids': [ {'view_id': 
form_res_id, 'view_mode': 'form'}, {'view_id': tree_res_id, 
'view_mode': 'tree'} ],
      'res_model': 'res.partner',
      'type': 'ir.actions.act_window'
}

But I can't open the specific view .... someone can help me ? someone know how 
to open specific view from wizard ??

Thank in advance

Zipgem




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=55009#55009

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to