title: how to call qweb report in another model in odoo?
body: <p>I have created a wizard in the that using many2one field of another model. where the qweb-report has been mentioned. Now I want to select 1record(from many2one field) and print the respective report.[previously i've done invoice printing in that menu's form view.] . sometimes here empty report is getting prints.Can anybody please explain it clearly?here is my code.</p>
  
  <pre><code>class invoice_wizard(osv.TransientModel):
  _name = 'invoice.wizard'
  
  _columns = {
  
      'name':fields.many2one('hotel.booking',string="CustomerName"),
  
      }
  
  def invoice_print(self,cr,uid,ids,vals,context=None):
      bookz=self.browse(cr,uid,ids,context=context)
      ids2=self.pool.get['book.room'].search([('name','=',bookz.name.name)])
  
  
      data = {
          'ids': ids2,
          'model': 'book.room',
          'form': self.env['book.room'].read(['name'])[0]
      }
  
      return self.env['report'].get_action(self, 'hotels.Booking_Details',
                                           data=data)
  
  invoice_wizard()  
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 537, in    _handle_exception
  return super(JsonRequest, self)._handle_exception(exception)
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 574, in dispatch
  result = self._call_function(**self.params)
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 310, in _call_function
  return checked_call(self.db, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/service/model.py", line 113, in wrapper
  return f(dbname, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 307, in checked_call
  return self.endpoint(*a, **kw)
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 803, in __call__
  return self.method(*args, **kw)
  File "/home/anipr/Desktop/odoo-8.0/openerp/http.py", line 403, in response_wrap
  response = f(*args, **kw)
  File "/home/anipr/Desktop/odoo-8.0/openerp/addons/web/controllers/main.py", line 952, in call_button
  action = self._call_kw(model, method, args, {})
  File "/home/anipr/Desktop/odoo-8.0/openerp/addons/web/controllers/main.py", line 940, in _call_kw
  return checked_call(request.db, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/service/model.py", line 113, in wrapper
  return f(dbname, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/addons/web/controllers/main.py", line 939, in checked_call
  return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/api.py", line 250, in wrapper
  return old_api(self, *args, **kwargs)
  File "/home/anipr/Desktop/odoo-8.0/openerp/addons/hotels/wizard/hotel_wizard.py", line 50, in invoice_print
  ids2=self.pool.get['book.room'].search([('name','=',bookz.name.name)])
  TypeError: 'instancemethod' object has no attribute '__getitem__'
  </code></pre>
  
  <p>thanks in advance..!!    </p>