Passing data with context to AbstractModel odoo
<p>I can pass context to another class of models.Model but in models.AbstractModel it return none.</p>

<p>Here is my code.</p>

<pre><code>class PrintWizard(models.TransientModel):
   _name = 'print.report.wizard'

   start_date = fields.Date()
   end_date = fields.Date()


   @api.multi
   def print_report(self):
       ctx = self.env.context.copy()
       ctx.update({'start': self.start_date, 'end': self.end_date})
       return self.env['report'].with_context(ctx).get_action('erp.report_id')


class ReportClass(models.AbstractModel):
      _name = 'report.erp.report_id'

    @api.multi
    def render_html(self, data):
        report_obj = self.env['report']
        report = report_obj._get_report_from_name('erp.report_id')
        start = self.env.context.get('start')
        end = self.env.context.get('end')
        docs = self.env['erp.account'].search([('start_date','&gt;=',start),('end_date', '&lt;=', end)])
        docargs = {
            'doc_model': report.model,
            'docs': docs
        }
        return report_obj.render('erp.report_id', docargs)
</code></pre>

<p>i tried to print the start and end, it return none i think i am passing the context to absractmodel in a improper way. </p>