title: Generate Odoo11 Custom Reports with Wizard. Format error: Not a PDF or corrupted
body: <p>i'm trying to print an Odoo custom report based on a wizard.
  it takes inputs from a wizard view. The wizard lets the user select a project with start_date and end_date. and click print button. so the list of activities that match the wizard form fields filter should be printed in a <code>PDF</code>. but i got a <code>PDF</code> file with <code>0 KB</code> and when i try to open i get <code>Format error: Not a PDF or corrupted.</code> and there is no errors in console
  Here is some key files</p>
  
  <p><strong>reports/__init__.py</strong></p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  
  from odoo import models, api
  class ReportWorkPlan(models.AbstractModel):
      _name = 'ewonga_pta.report_model_work_plan'
  
      @api.model
      def render_html(self, docids, data=None):
          docs = self.env['ew.pta.line'].browse(docids)
  
  
          docargs = {
              "doc_ids": docs.ids,
              "doc_model": "ew.pta.line",
              "docs": docs,
  
          }
          return docargs
  </code></pre>
  
  <p><strong>reports/print_work_plan_template.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;odoo&gt;
  
      &lt;template id="report_work_plan_template"&gt;
     &lt;t t-call="web.html_container"&gt;
          &lt;t t-foreach="docs" t-as="o"&gt;
              &lt;t t-call="web.external_layout"&gt;
                  &lt;div class="page"&gt;
                      &lt;h2&gt;Report title&lt;/h2&gt;
                  &lt;/div&gt;
              &lt;/t&gt;
          &lt;/t&gt;
      &lt;/t&gt;
  &lt;/template&gt;
  
  &lt;/odoo&gt;
  </code></pre>
  
  <p><strong>reports/work_plan_report.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;odoo&gt;
      &lt;report
          id="action_work_plan_print_report"
          string="Print Report"
          model="ewonga_pta.report_model_work_plan"
          report_type="qweb-pdf"
          name="ewonga_pta.report_work_plan_template"
          file="print_work_plan_template"
      /&gt;
  
  
  &lt;/odoo&gt;
  </code></pre>
  
  <p><strong>wizards/workplan.py</strong></p>
  
  <pre><code># -*- coding: utf-8 -*-
  from odoo import models, fields, api
  
  
  class WorkPlanWizard(models.TransientModel):
      _name = "ewonga_pta.work_plan_wizard"
  
  #     attendee_ids = fields.Many2many('res.partner', string="Attendees")
      project_id = fields.Many2one("account.analytic.account", domain=[("type_interne", "=", "projet" )])
      start_date = fields.Date("Date de début")
      end_date = fields.Date("Date de fin")
  
      @api.multi
      def check_report(self):
          data = {}
          data["form"] = self.read(
              [
                  "project_id",
                  "start_date",
                  "end_date"   
              ]
          )[0]
          return self.env.ref("ewonga_pta.action_work_plan_print_report").report_action(self, data=data)
  </code></pre>
  
  <p><strong>wizards/wizard_work_plan.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;odoo&gt;
  
          &lt;record id="action_work_plan_wizard_action" model="ir.actions.act_window"&gt;
      &lt;field name="name"&gt;Generate Workplan Report&lt;/field&gt;
      &lt;field name="res_model"&gt;ewonga_pta.work_plan_wizard&lt;/field&gt;
      &lt;field name="type"&gt;ir.actions.act_window&lt;/field&gt;
      &lt;field name="view_type"&gt;form&lt;/field&gt;
      &lt;field name="view_mode"&gt;form&lt;/field&gt;
      &lt;field name="view_id" ref="work_plan_wizard_form_view"/&gt;
      &lt;field name="target"&gt;new&lt;/field&gt;
  &lt;/record&gt;
  
  
      &lt;record model="ir.ui.view" id="work_plan_wizard_form_view"&gt;
              &lt;field name="name"&gt;work_plan_wizard.form&lt;/field&gt;
              &lt;field name="model"&gt;ewonga_pta.work_plan_wizard&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form string="Add Attendees"&gt;
                      &lt;group col="4" colspan="4"&gt;
                          &lt;field name="project_id"/&gt;
                          &lt;field name="start_date"/&gt;
                          &lt;field name="end_date"/&gt;
                      &lt;/group&gt;
  
                      &lt;group col="4" colspan="4"&gt;
                          &lt;footer&gt;
                    &lt;button name="check_report" string="Imprimer" type="object" default_focus="1" class="oe_highlight"/&gt;
                    or
                    &lt;button string="Annuler" class="oe_link" special="cancel"/&gt;
                &lt;/footer&gt;
                      &lt;/group&gt;
                  &lt;/form&gt;
  
  
  
              &lt;/field&gt;
          &lt;/record&gt;
  
  
  
  &lt;/odoo&gt;
  </code></pre>
  
  <p>os: Window 10 x64</p>
  
  <p>python: version 3.6.5</p>
  
  <p>wkhtmltopdf: version 0.12.3.2 (with patched qt)</p>
  
  <p>please help me to solve this issues. Thanks</p>