Odoo Help


Open window without closing the current view window ?

on 10/5/14, 5:29 PM 2,051 views

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 {
      else : return True

<button name="button_article"    string="Article" type="object" class="oe_highlight" icon="article" />

Or who know wwhich function called when we click on the button which appears in the right of the many2one fields ?



Your code should open a new window (a smaller floating window) and preserve your current view... the 'target' and 'nodestroy' keywords are used for that (just as you did).

René Schuster
on 10/6/14, 4:00 AM

No René my code didn't open in a new window, the button is in a pop up window

on 10/6/14, 4:14 AM
Juan José Scarafía
On 10/6/14, 8:40 AM

Hi kaisusr,

Try using 'target': 'blank' or 'target': '_blank' 


Juan José - Ing ADHOC


Dear Juan. This is not HTML so you can't use that.

GH Mediacloud, Grover Menacho
on 10/6/14, 8:48 AM

Dear juan, there is no changes, i want to open a new popup window from a button in a popup window without closing the current window.

on 10/6/14, 10:10 AM

Techno-Functional Associate with 7+ years of experience in Odoo (formerly known as OpenERP).

On 10/6/14, 3:41 AM

use 'target': 'current', it will open in next tab within a browser

i try to use target': 'current' but no changes

on 10/6/14, 4:14 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 10/5/14, 5:29 PM
Seen: 2051 times
Last updated: 3/16/15, 8:10 AM