title: Odoo 10 Qweb Report, define filename for PDF file
body: <p>I have the following custom report:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;odoo&gt;
    &lt;report
          id = "report_custom_sale_order"
          name = "custom_saleorder_v2.custom_report_saleorder"
          string = "Custom Quotation / Order"
          model = "sale.order"
          report_type = "qweb-pdf"
          report_name = "((object.number or 'SaleOrder').replace('/','')+'.pdf')"
          attachment_use = "False"
    /&gt;
  
  &lt;/odoo&gt;
  </code></pre>
  
  <p>I would like the PDF to be downloaded as <code>SO003.pdf</code> for sales order with reference/sequential <code>SO003</code>, and as <code>SaleOrder.pdf</code> for sales order in draft without assigned reference/sequential.</p>
  
  <p>When I try to implement such behaviour with report_name I get the following error:</p>
  
  <pre><code>AssertionError: Element odoo has extra content: report, line 11
  </code></pre>
  
  <p>How <code>report_name</code> shall be used?</p>
  
  <hr>
  
  <p>Following CZoellner comment I tried:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;odoo&gt;
      &lt;report
          id = "report_custom_sale_order"
          name = "custom_saleorder_v2.custom_report_saleorder"
          string = "Custom Quotation / Order"
          model = "sale.order"
          report_type = "qweb-pdf"
          attachment_use = "False"
      /&gt;
      &lt;record id="report_custom_sale_order" model="ir.actions.report.xml"&gt;
          &lt;field name="print_report_name"&gt;&lt;![CDATA[((object.number or 'SaleOrder').replace('/','')+'.pdf')]]&gt;&lt;/field&gt;
      &lt;/record&gt;
  &lt;/odoo&gt;
  </code></pre>
  
  <p>And I got the following error:</p>
  
  <pre><code>ParseError: "null value in column "name" violates not-null constraint
  DETAIL:  Failing row contains (523, 1, null, 1, 2018-02-13 17:17:20.385168, null, 2018-02-13 17:17:20.385168, ir.actions.report.xml, null, null, t, pdf, null, null, null, null, null, t, null, f, null, null, null, f, null, null, ((object.number or 'SaleOrder').replace('/','')+'.pdf')).
  " while parsing /usr/lib/python2.7/dist-packages/odoo/custom_addons/custom_saleorder_v2/reports/sale_report.xml:12, near
  &lt;record id="report_custom_sale_order" model="ir.actions.report.xml"&gt;
      &lt;field name="print_report_name"&gt;((object.number or 'SaleOrder').replace('/','')+'.pdf')&lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>Note: it is the same if I use <code>object.name</code> instead of <code>object.number</code> (which I think it is the right way of getting the reference/sequential of the document.</p>