title: Return from button search results to be displayed on the same page in OpenERP
body: <p>I have created Search button that, when clicked, launches tree view results in a new window.
  I want to have results in a tree view that is on the same page where Search button is, right below the Search button. Thanks for your help!</p>
  
  <p>Here is how the view looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/Hlfsv.jpg" alt="enter image description here"></p>
  
  <p>Here is the py code:</p>
  
  <pre><code>class mrp_bom(osv.Model):
      _inherit = 'mrp.bom'
  
      def action_search(self, cr, uid, ids, vals, context=None):
          bom_ids = []
          pd_ids = []
          product_complete = []
          ptemplid = int(self.browse(cr, uid, ids[0], context=context).product_tmpl_id.id)
          mbl_obj = self.pool.get('mrp.bom.line')
          id_s = mbl_obj.search(cr, uid,  [('product_id', '=', ptemplid)])
          for rec in mbl_obj.browse(cr, uid, id_s, context=context):    
              bom_ids.append(rec.bom_id.id) 
          for rec in self.browse(cr, uid, bom_ids, context=context):    
              pd_ids.append(rec.product_id.id)
          pp_obj = self.pool.get('product.product')
          for rec in pp_obj.browse(cr, uid, pd_ids, context=context):    
              product_complete.append('['+ str(rec.default_code) + ']'+ ' ' + str(rec.name_template))
          print "\n\n Inside action_search() product_complete ", product_complete
          # raise osv.except_osv(('Message!'), ('Inside action_search!' ) )
          # vals = {'product_id' : product_complete}
          # print "\n\n Inside action_search() vals ", vals
          # return {'value' : vals}
          domain = [('id','=',bom_ids)]
          return {
           'type': 'ir.actions.act_window',
           'name': _('BOM'),
           'res_model': 'mrp.bom',
           'view_mode': 'tree',
           'target': 'inlineview',
           'domain': domain,
                 }
  </code></pre>
  
  <p>and here is my XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;openerp&gt;
      &lt;data&gt;
           &lt;record id="action3" model="ir.actions.act_window"&gt;
              &lt;field name="name"&gt;Search BOM&lt;/field&gt;
              &lt;field name="type"&gt;ir.actions.act_window&lt;/field&gt;
              &lt;field name="res_model"&gt;mrp.bom&lt;/field&gt;
              &lt;field name="domain"&gt;[('bom_id', 'in', active_ids)]&lt;/field&gt;
              &lt;field name="view_type"&gt;form&lt;/field&gt;
              &lt;field name="target"&gt;inline&lt;/field&gt;
              &lt;field name="view_id" ref="bom_where_use_form"/&gt;
          &lt;/record&gt;
          &lt;record id="ir_BOM_structure3" model="ir.values"&gt;
              &lt;field eval="'client_action_multi'" name="key2"/&gt;
              &lt;field eval="'mrp.bom'" name="model"/&gt;
              &lt;field name="name"&gt;Search BOM&lt;/field&gt;
              &lt;field eval="'ir.actions.act_window,'+str(action3)" name="value"/&gt;
          &lt;/record&gt;
  
           &lt;record id="bom_where_use_form" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;bom.where.use.form&lt;/field&gt;
              &lt;field name="model"&gt;mrp.bom&lt;/field&gt;
              &lt;field name="priority" eval="20"/&gt;
              &lt;field name="type"&gt;form&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;label for="product_tmpl_id" string="Search BOM by Product" /&gt;
                  &lt;field name="product_tmpl_id" &gt; &lt;/field&gt;
                  &lt;button name="action_search" string="Search" type="object" class="oe_highlight"/&gt;               
              &lt;/field&gt; 
          &lt;/record&gt;
  
      &lt;/data&gt;
  &lt;/openerp&gt;
  </code></pre>