You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
5.7 KiB

  1. <?xml version="1.0"?>
  2. <document filename="test.pdf">
  3. <template pageSize="(21.59cm,27.94cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
  4. <pageTemplate id="first">
  5. <frame id="first" x1="1cm" y1="2cm" width="19.0cm" height="25cm"/>
  6. <pageGraphics>
  7. <setFont name="Helvetica-Bold" size="9"/>
  8. <!--COL 1-->
  9. <drawString x="1.0cm" y="27.0cm">[[ company.name ]]</drawString>
  10. <drawString x="14.5cm" y="27.0cm">[[ get_inf_text(data['form']) ]] - [[ company.currency_id.name ]]</drawString>
  11. <!--COL 2-->
  12. <setFont name="Helvetica" size="8"/>
  13. <drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
  14. <drawString x="18.5cm" y="1cm">Page <pageNumber/></drawString>
  15. <lineMode width="0.7"/>
  16. <lines>1cm 26.9cm 20.0cm 26.9cm</lines>
  17. <setFont name="Helvetica" size="8"/>
  18. </pageGraphics>
  19. </pageTemplate>
  20. </template>
  21. <stylesheet>
  22. <blockTableStyle id="BODY">
  23. <blockValign value="TOP"/>
  24. <blockAlignment value="RIGHT"/>
  25. <blockTopPadding length="1.0"/>
  26. <blockBottomPadding length="1.0"/>
  27. <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1" thickness='0.25'/>
  28. </blockTableStyle>
  29. <blockTableStyle id="BODY_STRIKE">
  30. <blockValign value="TOP"/>
  31. <blockAlignment value="RIGHT"/>
  32. <blockTopPadding length="1.0"/>
  33. <blockBottomPadding length="1.0"/>
  34. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,1" stop="-1,-1" thickness='0.5'/>
  35. </blockTableStyle>
  36. <blockTableStyle id="TOP_TABLE">
  37. <blockAlignment value="LEFT"/>
  38. <blockValign value="TOP"/>
  39. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1" thickness='0.25'/>
  40. </blockTableStyle>
  41. <initialize>
  42. <paraStyle name="all" alignment="justify"/>
  43. </initialize>
  44. <paraStyle
  45. name="TITLE_LEFT_ALIGN"
  46. fontName="Courier-Bold"
  47. fontSize="8.0"
  48. leading="10"
  49. alignment="RIGHT"
  50. spaceBefore="0.0"
  51. spaceAfter="0.0"/>
  52. <paraStyle
  53. name="TOP_TITLE"
  54. fontName="Courier-Bold"
  55. fontSize="9.0"
  56. leftIndent="0.0"
  57. alignment="LEFT"/>
  58. <paraStyle name="TITLES"
  59. fontName="Courier-Bold"
  60. fontSize="8.0"
  61. leading="10"
  62. alignment="LEFT"
  63. spaceBefore="0.0"
  64. spaceAfter="0.0"/>
  65. </stylesheet>
  66. <images/>
  67. <story>
  68. <para>[[setLang(user.context_lang)]]</para>
  69. <blockTable colWidths="19cm" style="TOP_TABLE" repeatRows="1">
  70. <tr>
  71. <td>
  72. <para style="TOP_TITLE">Año Fiscal: [[ get_fiscalyear_text(data['form']) or removeParentNode('para') ]]</para>
  73. <para style="TOP_TITLE">Periodos: [[ get_periods_and_date_text(data['form'])['periods'] or removeParentNode('para') ]]</para>
  74. <para style="TOP_TITLE">Fecha Intervalo: [[ get_periods_and_date_text(data['form'])['date'] or removeParentNode('para') ]]</para>
  75. </td>
  76. </tr>
  77. </blockTable>
  78. <blockTable colWidths="3.0cm,8.0cm,4.0cm,4.0cm" style="BODY" repeatRows="1">
  79. <tr noRowsplits="1">
  80. <td>
  81. <para style="TITLE_LEFT_ALIGN">
  82. <font>Code</font>
  83. </para>
  84. </td>
  85. <td>
  86. <para style="TITLES">Account</para>
  87. </td>
  88. <td>
  89. <para style="TITLE_LEFT_ALIGN">Debit</para>
  90. </td>
  91. <td>
  92. <para style="TITLE_LEFT_ALIGN">Credit</para>
  93. </td>
  94. </tr>
  95. <tr>
  96. <td>
  97. <para style="TITLE_LEFT_ALIGN">[[ repeatIn(lines(data['form']), 'a') ]]
  98. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  99. <i>[[a['label']==True and a['code'] or '' ]]</i>
  100. </para>
  101. </td>
  102. <td>
  103. <para style="TITLES">
  104. <font>[[ ((a['total'] and not a['label']) and setTag('para','para',{'alignment':"RIGHT"}) or (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}))) or removeParentNode('font') ]]</font>
  105. <font>[[ a['name'] ]]</font>
  106. </para>
  107. </td>
  108. <td>
  109. <para style="TITLE_LEFT_ALIGN">
  110. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  111. <font>[[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']]</font>
  112. </para>
  113. </td>
  114. <td>
  115. <para style="TITLE_LEFT_ALIGN">
  116. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  117. <font>[[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']]</font>
  118. </para>
  119. </td>
  120. </tr>
  121. </blockTable>
  122. </story>
  123. </document>