title: Generating odoo report on the basis of active records
body: <p>I am using following function to fetch records in my report.</p>
  <pre><code>def get_records(self):
      recsss = self.pool.get('overtime_oms_bcube.overtime_oms_bcube').search(self.cr,self.uid, [], context=self.context)
      resss = self.pool.get('overtime_oms_bcube.overtime_oms_bcube').browse(self.cr, self.uid, recsss)
      return resss
  </code></pre>
  <p>and calling the records by following way:</p>
  <pre><code>&lt;t t-set=&quot;i&quot; t-value=&quot;1&quot;/&gt;
  &lt;tr t-foreach=&quot;get_records()&quot; t-as=&quot;data&quot;&gt;
  
      &lt;td style=&quot;display:none&quot;&gt;
          &lt;t t-esc=&quot;i&quot;/&gt;
          &lt;t t-set=&quot;i&quot; t-value=&quot;i+1&quot;/&gt;
      &lt;/td&gt;
  
      &lt;td t-esc=&quot;data['employee_code']&quot;&gt;&lt;/td&gt;
      &lt;td t-esc=&quot;data['employee'].name&quot;&gt;&lt;/td&gt;
      &lt;td t-esc=&quot;data['employee'].job_id.name&quot;&gt;&lt;/td&gt;
      &lt;td t-esc=&quot;data['no_of_days']&quot;&gt;&lt;/td&gt;
      &lt;td t-esc=&quot;data['employee'].contract_id.wage&quot;&gt;&lt;/td&gt;
      &lt;td t-esc=&quot;data['employee'].contract_id.wage*0.64516129&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  <p>The problem is that the resulting report is showing all the records saved in the data base. I want it to show only those records which are selected in the tree view. As you see the active/selected records in the image below.</p>
  <p><a href="https://i.stack.imgur.com/ERCEB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ERCEB.jpg" alt="enter image description here" /></a>And even in if we are in the single record view and generate a report, it still shows all the record but according to the flow it need to generate a report of that record from where we are generating that report.</p>
  <p>please suggest something that helps in such requirement. Thanks in advance.</p>