<?xml version="1.0"?>
<document filename="test.pdf">
  <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
    </pageTemplate>
  </template>
  <stylesheet>
    <blockTableStyle id="Standard_Outline">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
    </blockTableStyle>
    <blockTableStyle id="Table1">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
      <lineStyle kind="GRID" colorName="black"/>
    </blockTableStyle>
    <blockTableStyle id="Table2">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
    </blockTableStyle>
    <blockTableStyle id="Table3">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
      <lineStyle kind="GRID" colorName="black"/>
      <blockBackground colorName="#808080" start="0,0" stop="0,0"/>
      <blockBackground colorName="#808080" start="1,0" stop="1,0"/>
      <blockBackground colorName="#808080" start="2,0" stop="2,0"/>
      <blockBackground colorName="#808080" start="3,0" stop="3,0"/>
      <blockBackground colorName="#808080" start="4,0" stop="4,0"/>
      <blockBackground colorName="#808080" start="5,0" stop="5,0"/>
      <blockBackground colorName="#808080" start="6,0" stop="6,0"/>
    </blockTableStyle>
    <blockTableStyle id="Table4">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
      <lineStyle kind="GRID" colorName="black"/>
      <blockBackground colorName="#cccccc" start="0,0" stop="0,0"/>
      <blockBackground colorName="#cccccc" start="1,0" stop="1,0"/>
      <blockBackground colorName="#cccccc" start="2,0" stop="2,0"/>
      <blockBackground colorName="#cccccc" start="3,0" stop="3,0"/>
      <blockBackground colorName="#cccccc" start="4,0" stop="4,0"/>
      <blockBackground colorName="#cccccc" start="5,0" stop="5,0"/>
      <blockBackground colorName="#cccccc" start="6,0" stop="6,0"/>
    </blockTableStyle>
    <initialize>
      <paraStyle name="all" alignment="justify"/>
    </initialize>
    <paraStyle name="P1" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
    <paraStyle name="P2" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
    <paraStyle name="P3" fontName="Times-Roman" fontSize="25.0" leading="31" alignment="CENTER"/>
    <paraStyle name="P4" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT"/>
    <paraStyle name="P5" fontName="Times-Roman"/>
    <paraStyle name="P6" fontName="Times-Roman" fontSize="10.0" leading="13"/>
    <paraStyle name="P7" fontName="Times-Roman" fontSize="10.0" leading="13"/>
    <paraStyle name="P8" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
    <paraStyle name="P9" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
    <paraStyle name="P10" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
    <paraStyle name="P11" fontName="Times-Roman"/>
    <paraStyle name="P12" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="CENTER"/>
    <paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
    <paraStyle name="P14" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
    <paraStyle name="P15" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
    <paraStyle name="P16" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
    <paraStyle name="P17" fontName="Times-Roman" fontSize="6.0" leading="8"/>
    <paraStyle name="P18" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
    <paraStyle name="Standard" fontName="Times-Roman"/>
    <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
    <paraStyle name="Footer" fontName="Times-Roman"/>
    <paraStyle name="Table Contents" fontName="Times-Roman"/>
    <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
    <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
  </stylesheet>
  <story>
    <para style="P1">[[ repeatIn(objects, 'o') ]]</para>
    <para style="P2">Delivery order [[ o.sale_id.name ]]</para>
    <para style="P3">[[ o.sale_id.state!='done' and 'draft' or '' ]]</para>
    <para style="P4">
      <font color="white"> </font>
    </para>
    <blockTable colWidths="241.0,241.0" repeatRows="1" style="Table1">
      <tr>
        <td>
          <para style="P5">Invoiced to</para>
          <para style="P6">[[ o.sale_id.partner_invoice_id.partner_id.name ]]</para>
          <para style="P7">[[ o.sale_id.partner_invoice_id.street ]]</para>
          <para style="P7">[[ o.sale_id.partner_invoice_id.zip ]] [[ o.sale_id.partner_invoice_id.city ]]</para>
        </td>
        <td>
          <para style="P5">Shipped to</para>
          <para style="P6">[[ o.sale_id.partner_shipping_id.partner_id.name ]]</para>
          <para style="P7">[[ o.sale_id.partner_shipping_id.street ]]</para>
          <para style="P7">[[ o.sale_id.partner_shipping_id.zip ]] [[ o.sale_id.partner_shipping_id.city ]]</para>
        </td>
      </tr>
    </blockTable>
    <para style="Standard">
      <font color="white"> </font>
    </para>
    <blockTable colWidths="98.0,88.0,90.0,101.0,105.0" repeatRows="1" style="Table2">
      <tr>
        <td>
          <para style="P8">Order ref.</para>
        </td>
        <td>
          <para style="P9">Order date</para>
        </td>
        <td>
          <para style="P9">Shipping date</para>
        </td>
        <td>
          <para style="P9">Delivery scheduled on</para>
        </td>
        <td>
          <para style="P9">Carrier</para>
        </td>
      </tr>
      <tr>
        <td>
          <para style="P10">[[ o.sale_id.name ]]</para>
        </td>
        <td>
          <para style="P10">[[ o.sale_id.date_order ]]</para>
        </td>
        <td>
          <para style="P10">
            <font color="white"> </font>
          </para>
        </td>
        <td>
          <para style="P10">
            <font color="white"> </font>
          </para>
        </td>
        <td>
          <para style="P10">
            <font color="white"> </font>
          </para>
        </td>
      </tr>
    </blockTable>
    <para style="P11">
      <font color="white"> </font>
    </para>
    <blockTable colWidths="74.0,151.0,81.0,32.0,45.0,34.0,66.0" repeatRows="1" style="Table3">
      <tr>
        <td>
          <para style="P12">Reference</para>
        </td>
        <td>
          <para style="P12">Designation</para>
        </td>
        <td>
          <para style="P12">Quantity</para>
        </td>
        <td>
          <para style="P12">S.U.</para>
        </td>
        <td>
          <para style="P12">
            <font color="white"> </font>
          </para>
        </td>
        <td>
          <para style="P12">
            <font color="white"> </font>
          </para>
        </td>
        <td>
          <para style="P12">
            <font color="white"> </font>
          </para>
        </td>
      </tr>
    </blockTable>
    <section>
      <para style="Text body">[[ repeatIn(o.move_lines, 'line') ]]</para>
      <blockTable colWidths="73.0,150.0,81.0,32.0,45.0,34.0,66.0" style="Table4">
        <tr>
          <td>
            <para style="P13">[[line.product_id.code]]</para>
          </td>
          <td>
            <para style="P13">[[line.product_id.name]]</para>
            <para style="P13">
              <font color="white"> </font>
            </para>
            <para style="P13">
              <font color="white"> </font>
            </para>
            <para style="P13">
              <font color="white"> </font>
            </para>
          </td>
          <td>
            <para style="P14">[[line.product_qty]]</para>
          </td>
          <td>
            <para style="P13">[[line.product_uom.name]]</para>
          </td>
          <td>
            <para style="P13">
              <font color="white"> </font>
            </para>
          </td>
          <td>
            <para style="P13">
              <font color="white"> </font>
            </para>
          </td>
          <td>
            <para style="P13">
              <font color="white"> </font>
            </para>
          </td>
        </tr>
        <tr>
          <td>
            <para style="P15">[[line.product_id.ean13]]</para>
          </td>
          <td>
            <para style="P15">Logistical unit : [[line.product_packaging.qty]]</para>
            <para style="P15">[[line.tracking_id and 'Packaging : %d package of %d P' % (1, line.product_packaging.qty) or '']]</para>
            <para style="P15">[[line.tracking_id and 'Pallets reference: %s' % line.tracking_id.name or '']] Batch reference<font face="Times-Roman" size="9.0"> : [[line.lot_id.name or '/']]</font></para>
          </td>
          <td>
            <para style="P15">[[ line.product_uos_qty ]]</para>
          </td>
          <td>
            <para style="P16">[[line.product_uos.name]]</para>
          </td>
          <td>
            <para style="P15">
              <font color="white"> </font>
            </para>
          </td>
          <td>
            <para style="P15">
              <font color="white"> </font>
            </para>
          </td>
          <td>
            <para style="P15">
              <font color="white"> </font>
            </para>
          </td>
        </tr>
      </blockTable>
      <para style="P17">
        <font color="white"> </font>
      </para>
    </section>
    <para style="P18">
      <font color="white"> </font>
    </para>
  </story>
</document>

