Hello,
i want to open a window view, but without closing the current window, but this code close the curren window, someone help me ?
def button_article(self, cr, uid, ids, context=None):
ctx = (context or {}).copy()
ctx['article'] = self.browse(cr, uid, ids[0], context=context).product_id.id
ctx['form_view_ref'] = 'itk_entrepot.itk_entrepot_article_maj'
if ctx['article'] :
return {
'name':'Article',
'view_type':'form',
'view_mode':'form',
'res_model':'product.product',
'view_id':False,
'target':'new',
'type':'ir.actions.act_window',
'domain':[('id','=',ctx['article'])],
'context':ctx,
'nodestroy':True,
'res_id':ctx['article'],
}
else : return True
<button name="button_article" string="Article" type="object" class="oe_highlight" icon="article" />