title: How to call a field on different models using qweb report in odoo 10?
body: <p>I have created a report using qweb , when i need to show the others data from different models it says error  "account.invoice object has no attribute 'pack_operation_product_ids'" . My main question here is how to call pack_operation_product_ids from that same module but different object or models. Thanks</p>
  
  <p><strong>PP.xml</strong></p>
  
  <pre><code>&lt;tr t-foreach="o.pack_operation_product_ids" t-as="m"&gt;
  &lt;tr t-foreach="o.picking_ids" t-as="l"&gt;
  &lt;td&gt; &lt;span t-field="l.name"/&gt; | &lt;span t-field="m.name"/&gt;  &lt;/td&gt;
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from odoo import fields,models,api
  
  @api.multi
  
  def get_data(self):
      record_collection = []
      # Do your browse, search, calculations, .. here and then return the data (which you can then use in the QWeb)
      record_collection = self.env['stock.picking'].search([('pack_operation_product_ids', '=', 'o.pack_operation_product_ids')])
      return record_collection
  </code></pre>
  
  <p><strong>return error</strong> </p>
  
  <pre><code>AttributeError: 'account.invoice' object has no attribute 'pack_operation_product_ids'
  
  Error to render compiling AST
  
  AttributeError: 'account.invoice' object has no attribute 'pack_operation_product_ids'
  
  Template: invoice_report2.qweb_inv_pp_document
  Path: /templates/t/t/t/div/div[3]/div[2]/table/tbody/tr
  Node: &lt;tr t-foreach="o.pack_operation_product_ids" t-as="m"&gt;
  
  &lt;!-- &lt;tr t-foreach="request.env['stock.picking'].search([(
  
  'pack_operation_product_ids', '=', o.pack_operation_product_ids.name)])" t-as="obj"&gt; --&gt;
  
  &lt;!--&lt;tr t-set="record_collection" t-value="doc.get_data()"&gt;--&gt;
  
  &lt;tr t-foreach="o.picking_ids" t-as="l"&gt;
  
  &lt;td&gt; &lt;span t-field="l.name"/&gt; | &lt;span t-field="m.name"/&gt;  &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/tr&gt;   
  </code></pre>