title: Table size, thead and tbody in Qweb odoo 10
body: <p>i have 2 problemes with long tables in Qweb.</p>
  
  <p>1/ if there is no place for all table on first page , Qweb print all the table on seconde page . but i want the first part of table on the first page  and the seconde part on the seconde page (look to img1 and img2).</p>
  
  <p>2/if the table is too long i have probleme with thead and tbody for all pages(
  thead and tbody start from the same line so for all pages the first ligne is illisible ) except the first one  (look to img3 and img4).</p>
  
  <p><a href="https://i.stack.imgur.com/qh24l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qh24l.png" alt="img1"></a>
  <a href="https://i.stack.imgur.com/aaqAt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aaqAt.png" alt="img2"></a>
  <a href="https://i.stack.imgur.com/IGaAJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IGaAJ.png" alt="img3"></a>
  <a href="https://i.stack.imgur.com/TEBNG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TEBNG.png" alt="img4"></a></p>
  
  <p>i added a comment to understand which table i'm talking about it (comment "This table" before table and "End table" after table).</p>
  
  <p>Thanks </p>
  
  <pre><code>&lt;odoo&gt;
    &lt;data&gt;
  
  
          &lt;record id="facture_cadre_format" model="report.paperformat"&gt;
              &lt;field name="name"&gt;European A4&lt;/field&gt;
              &lt;field name="default" eval="True" /&gt;
              &lt;field name="format"&gt;A4&lt;/field&gt;
              &lt;field name="page_height"&gt;0&lt;/field&gt;
              &lt;field name="page_width"&gt;0&lt;/field&gt;
              &lt;field name="orientation"&gt;Portrait&lt;/field&gt;
              &lt;field name="margin_top"&gt;80&lt;/field&gt;
              &lt;field name="margin_bottom"&gt;23&lt;/field&gt;
              &lt;field name="margin_left"&gt;7&lt;/field&gt;
              &lt;field name="margin_right"&gt;7&lt;/field&gt;
              &lt;field name="header_line" eval="False" /&gt;
              &lt;field name="header_spacing"&gt;70&lt;/field&gt;
              &lt;field name="dpi"&gt;90&lt;/field&gt;
          &lt;/record&gt;
  
      &lt;report id="new_factures"
              string="Facture (new)"
              model="account.invoice"
              report_type="qweb-pdf"
              name="livraison_report.new_facture"
              paperformat="facture_cadre_format"
      /&gt;
  
      &lt;template id="new_facture"&gt;
        &lt;t t-call="report.html_container"&gt;
            &lt;t t-call="facture_layout.facture_layout"&gt;
            &lt;div class="page"&gt;
              &lt;!-- Report page content --&gt;
              &lt;style&gt;
                  tbody { 
                           font-size: 10px;
                         }
  
                  .police { 
                           font-size: 10px;
                         }
  
                 .tableau {
                          page-break-inside: avoid;
                      }
  
              &lt;/style&gt;
  
              &lt;t t-foreach="docs" t-as="o"&gt;
  
  
  
              &lt;h2&gt;
                  &lt;span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')"&gt;Facture&lt;/span&gt;
                  &lt;span t-if="o.type == 'out_invoice' and o.state == 'proforma2'"&gt;PRO-FORMA&lt;/span&gt;
                  &lt;span t-if="o.type == 'out_invoice' and o.state == 'draft'"&gt;Draft Invoice&lt;/span&gt;
                  &lt;span t-if="o.type == 'out_invoice' and o.state == 'cancel'"&gt;Cancelled Invoice&lt;/span&gt;
                  &lt;span t-if="o.type == 'out_refund'"&gt;Refund&lt;/span&gt;
                  &lt;span t-if="o.type == 'in_refund'"&gt;Vendor Refund&lt;/span&gt;
                  &lt;span t-if="o.type == 'in_invoice'"&gt;Vendor Bill&lt;/span&gt;
                  &lt;span t-field="o.number"/&gt;
              &lt;/h2&gt;
  
              &lt;div class="row mt32 mb32"&gt;
  
                      &lt;div class="col-xs-2" t-if="o.name"&gt;
                          &lt;strong&gt;Description:&lt;/strong&gt;
                          &lt;p t-field="o.name"/&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-xs-2" t-if="o.date_invoice"&gt;
                          &lt;strong&gt;Date de la facture:&lt;/strong&gt;
                          &lt;p t-field="o.date_invoice"/&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-xs-2" t-if="o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')"&gt;
                          &lt;strong&gt;Date d'échéance:&lt;/strong&gt;
                          &lt;p t-field="o.date_due"/&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-xs-2" t-if="o.origin"&gt;
                          &lt;strong&gt;Origine:&lt;/strong&gt;
                          &lt;p t-field="o.origin"/&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-xs-2" t-if="o.partner_id.ref"&gt;
                          &lt;strong&gt;BL:&lt;/strong&gt;
                           &lt;span t-esc="', '.join(map(lambda x: (x.name), o.picking_id))"/&gt;
                      &lt;/div&gt;
  
                      &lt;div name="reference" class="col-xs-2" t-if="o.reference"&gt;
                          &lt;strong&gt;Reference:&lt;/strong&gt;
                          &lt;p t-field="o.reference"/&gt;
                      &lt;/div&gt;
  
                  &lt;/div&gt;
  
  &lt;!-- _______________________________________________________This Table__________________________________________________________________ --&gt;
    &lt;table class="table table-condensed table-bordered "&gt;
              &lt;thead&gt;
                      &lt;tr style="background-color:#A9E2F3;"&gt;
                          &lt;th&gt;Description&lt;/th&gt;
                          &lt;th class="hidden"&gt;Source Document&lt;/th&gt;
                          &lt;th class="text-right"&gt;P.U&lt;/th&gt;
                          &lt;th class="text-right"&gt;PPA&lt;/th&gt;
                          &lt;th class="text-right"&gt;PPH&lt;/th&gt;
                          &lt;th class="text-right"&gt;Qté&lt;/th&gt;
                          &lt;th class="text-center"&gt;UM&lt;/th&gt;
                          &lt;th class="text-center"&gt;Mnt Brut&lt;/th&gt;
                          &lt;th class="text-right"&gt;RM(%)&lt;/th&gt;
                          &lt;th class="text-right"&gt;Tax Excluded Price&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
  
                  &lt;tbody&gt;
                      &lt;tr t-foreach="o.invoice_line_ids" t-as="l"&gt;
  
                          &lt;td&gt;
                              &lt;span t-field="l.name"/&gt;
                                  &lt;t t-if="(l.lot_formatted_note is not False)"&gt;
                                  &lt;div style="margin-left:25px;" t-field="l.lot_formatted_note" /&gt;
                                  &lt;br/&gt;
                                  &lt;/t&gt;
                          &lt;/td&gt;
  
                          &lt;td class="hidden"&gt;&lt;span t-field="l.origin"/&gt;&lt;/td&gt;
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.price_unit"/&gt;
                          &lt;/td&gt;
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.ppa"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.prix_pharmacien"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-right"&gt;
                              &lt;span t-esc="'%.0f'%(l.quantity)"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-center"&gt;
                              &lt;span t-field="l.uom_id" groups="product.group_uom"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.price_subtotal_brut"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.discount"/&gt;
                          &lt;/td&gt;
  
                          &lt;td class="text-right"&gt;
                              &lt;span t-field="l.price_subtotal" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                          &lt;/td&gt;
  
                      &lt;/tr&gt;
                   &lt;/tbody&gt;
              &lt;/table&gt;
  
  &lt;!-- _______________________________________________________End Table__________________________________________________________________ --&gt;
  
  
              &lt;div class="row"&gt;
                  &lt;div class="col-xs-4 pull-right"&gt;
              &lt;table class="table table-condensed table-bordered tableau"&gt;
                          &lt;tr class="border-black" &gt;
                              &lt;td&gt;&lt;strong&gt;Montant BRUT&lt;/strong&gt;&lt;/td&gt;
                              &lt;td class="text-right"&gt;
                                  &lt;span t-field="o.amount_untaxed_brut" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr class="border-black" &gt;
                              &lt;td&gt;&lt;strong&gt;Montant Remise&lt;/strong&gt;&lt;/td&gt;
                              &lt;td class="text-right"&gt;
                                  &lt;span t-field="o.amount_discount" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr class="border-black"&gt;
                              &lt;td&gt;&lt;strong&gt;Montant HT&lt;/strong&gt;&lt;/td&gt;
                              &lt;td class="text-right"&gt;
                                  &lt;span t-field="o.amount_untaxed" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;&lt;span t-esc="amount_by_group[0] if len(o.tax_line_ids) &amp;gt; 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/&gt;&lt;/td&gt;
                                  &lt;td class="text-right"&gt;
                                      &lt;span t-esc="amount_by_group[1]" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/t&gt;
                          &lt;tr class="border-black"&gt;
                              &lt;td&gt;&lt;strong&gt;Montant TTC&lt;/strong&gt;&lt;/td&gt;
                              &lt;td class="text-right"&gt;
                                   &lt;span t-field="o.amount_total" t-options="{&amp;quot;widget&amp;quot;: &amp;quot;monetary&amp;quot;, &amp;quot;display_currency&amp;quot;: o.currency_id}"/&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
                      &lt;p class="police"&gt;
                              &lt;strong&gt;ARRETEE LA PRESENTE FACTURE A LA SOMME DE:&lt;/strong&gt;
                              &lt;span t-field="o.amount_to_text"/&gt;
                      &lt;/p&gt;
  
              &lt;p t-if="o.comment"&gt;
                  &lt;strong&gt;Comment:&lt;/strong&gt;
                  &lt;span t-field="o.comment"/&gt;
              &lt;/p&gt;
              &lt;p t-if="o.payment_term_id"&gt;
                  &lt;span t-field="o.payment_term_id.note"/&gt;
              &lt;/p&gt;
              &lt;p t-if="o.fiscal_position_id.note"&gt;
                  &lt;strong&gt;Fiscal Position Remark:&lt;/strong&gt;
                  &lt;span t-field="o.fiscal_position_id.note"/&gt;
              &lt;/p&gt;
  
               &lt;table class="table table-condensed table-bordered tableau"&gt;
                          &lt;thead&gt;
                              &lt;tr &gt;
                                  &lt;th class="text-center"&gt;&lt;strong&gt;Commercial&lt;/strong&gt;&lt;/th&gt;
                                  &lt;th class="text-center"&gt;&lt;strong&gt;Client&lt;/strong&gt;&lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
  
                          &lt;tbody&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                      &lt;br/&gt;
                      &lt;br/&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                      &lt;br/&gt;
                      &lt;br/&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/tbody&gt;
                      &lt;/table&gt;
  
  
  
  
              &lt;/t&gt;
            &lt;/div&gt;
        &lt;/t&gt;
        &lt;/t&gt;
      &lt;/template&gt;
    &lt;/data&gt;
  &lt;/odoo&gt;
  </code></pre>