<?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="Tableau2">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
      <lineStyle kind="GRID" colorName="black"/>
      <blockBackground colorName="#c0c0c0" start="0,0" stop="0,0"/>
      <blockBackground colorName="#c0c0c0" start="1,0" stop="1,0"/>
      <blockBackground colorName="#c0c0c0" start="2,0" stop="2,0"/>
      <blockBackground colorName="#c0c0c0" start="3,0" stop="3,0"/>
      <blockBackground colorName="#c0c0c0" start="4,0" stop="4,0"/>
      <blockBackground colorName="#c0c0c0" start="5,0" stop="5,0"/>
    </blockTableStyle>
    <blockTableStyle id="Table1">
      <blockAlignment value="LEFT"/>
      <blockValign value="TOP"/>
    </blockTableStyle>
    <initialize>
      <paraStyle name="all" alignment="justify"/>
    </initialize>
    <paraStyle name="P1" fontName="Times-Roman" fontSize="14.0" leading="17"/>
    <paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="LEFT"/>
    <paraStyle name="P3" fontName="Times-Bold" fontSize="14.0" leading="17" alignment="LEFT"/>
    <paraStyle name="P4" fontName="Times-Bold" fontSize="11.0" leading="14" alignment="LEFT"/>
    <paraStyle name="P5" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
    <paraStyle name="P6" fontName="Times-BoldItalic" fontSize="11.0" leading="14" alignment="CENTER"/>
    <paraStyle name="P7" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
    <paraStyle name="P8" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
    <paraStyle name="P9" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="RIGHT"/>
    <paraStyle name="P10" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="RIGHT"/>
    <paraStyle name="P11" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
    <paraStyle name="P12" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="RIGHT"/>
    <paraStyle name="P13" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="LEFT"/>
    <paraStyle name="P14" fontName="Times-BoldItalic" fontSize="14.0" leading="17" alignment="LEFT"/>
    <paraStyle name="P15" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
    <paraStyle name="Standard" fontName="Times-Roman"/>
    <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
    <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
    <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
    <paraStyle name="Table Contents" fontName="Times-Roman"/>
    <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
    <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
    <paraStyle name="Index" fontName="Times-Roman"/>
  </stylesheet>
  <story>
    <para style="P1">[[ repeatIn(objects,'o') ]]</para>
    <para style="P1">
      <font color="white"> </font>
    </para>
    <para style="P2">HR Expenses [[ o.name or '' ]]</para>
    <para style="P3">
      <font color="white"> </font>
    </para>
    <para style="P4">Employee: <font face="Times-Roman">[[ o.employee_id.name ]]</font></para>
    <para style="P4">Date: <font face="Times-Roman">[[time.strftime('%d/%m/%Y', time.strptime(o.date, '%Y-%m-%d'))]]</font></para>
    <para style="P4">Reference: <font face="Times-Roman">[[o.ref]]</font></para>
    <para style="P5">
      <font color="white"> </font>
    </para>
    <blockTable colWidths="71.0,110.0,75.0,75.0,75.0,75.0" style="Tableau2">
      <tr>
        <td>
          <para style="P6">Date</para>
        </td>
        <td>
          <para style="P6">Name</para>
        </td>
        <td>
          <para style="P6">Reference</para>
        </td>
        <td>
          <para style="P6">Unit price</para>
        </td>
        <td>
          <para style="P6">Quantities</para>
        </td>
        <td>
          <para style="P6">Total</para>
        </td>
      </tr>
      <tr>
        <td>
          <para style="P7">[[ repeatIn(o.line_ids,'line') ]]</para>
          <para style="P7">[[ time.strftime('%d/%m/%Y', time.strptime(line.date_value, '%Y-%m-%d')) or '' ]]</para>
        </td>
        <td>
          <para style="P8">[[ line.name or '']]</para>
          <para style="P8">[[ line.description or '']]</para>
        </td>
        <td>
          <para style="P8">[[ line.ref or '']]</para>
        </td>
        <td>
          <para style="P9">[[ '%.2f' % line.unit_amount or '']]</para>
        </td>
        <td>
          <para style="P9">[[ '%.2f' % line.unit_quantity or '']]</para>
        </td>
        <td>
          <para style="P9">[[ '%.2f' % line.total_amount or '' ]] [[company.currency_id.name ]]</para>
        </td>
      </tr>
    </blockTable>
    <para style="P5">
      <font color="white"> </font>
    </para>
    <para style="P10">
      <font color="white"> </font>
    </para>
    <blockTable colWidths="331.0,75.0,76.0" style="Table1">
      <tr>
        <td>
          <para style="P11">
            <font color="white"> </font>
          </para>
        </td>
        <td>
          <para style="P12">Total:</para>
        </td>
        <td>
          <para style="P12">[[ '%.2f' % o.amount ]] [[ company.currency_id.name ]]</para>
        </td>
      </tr>
    </blockTable>
    <para style="P5">
      <font color="white"> </font>
    </para>
    <para style="P13">[[ o.note or '' ]] [[ setTag('para','xpre') ]]</para>
    <para style="P5">
      <font color="white"> </font>
    </para>
    <para style="P14">Certified honest and conform,</para>
    <para style="P14">(Date and signature)</para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">
      <font color="white"> </font>
    </para>
    <para style="P15">This document must be dated and signed for reimbursment</para>
  </story>
</document>

