Odoo Help

Welcome!

This community 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.

0

Open a popup window from a button in a list in popup window in openERP?

By
kaisusr
on 10/14/14, 6:05 AM 839 views

i have a button in a popup window and i want from this button to open an other popup window without closing the current popup window.like for example in many2one field on edit, a link appear in the right of the field and he open a new popup window

i used this code but it close the current popup window:

 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'
      print "button article"
      if ctx['article'] :
          return {
        'name':'Article',
        'view_type':'form',
        'view_mode':'form',
        'res_model':'product.product',
        'res_id': ids[0],
        '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" />

i think that the problem can be resolved with javascript code, but i dont know how

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/14/14, 6:05 AM
Seen: 839 times
Last updated: 3/16/15, 8:10 AM