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.

397 lines
19 KiB

  1. <?xml version="1.0"?>
  2. <document filename="test.pdf">
  3. <template pageSize="(27.94cm,21.59cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
  4. <pageTemplate id="first">
  5. <frame id="first" x1="1.0cm" y1="1.0cm" width="26.0cm" height="16.65cm"/>
  6. <pageGraphics>
  7. <setFont name="Helvetica-Oblique" size="6"/>
  8. <image x="1.0cm" y="17.65cm" width="5.0cm">[[company.logo and company.logo or removeParentNode('image')]]</image>
  9. <!--
  10. <drawString x="1.0cm" y="24.5cm">[[company.logo and removeParentNode('para') or company.name]]</drawString>
  11. -->
  12. <place x="-3.5cm" y="16.15cm" width="19cm" height="5.0cm">
  13. <blockTable colWidths="9.6cm,9.4cm" style="TITLE">
  14. <tr>
  15. <td><para style="TOP_TITLE"></para></td>
  16. <td><para style="TITLE_CENTER_NAME">
  17. <font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
  18. <font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
  19. </para></td>
  20. </tr>
  21. <tr>
  22. <td><para style="TOP_TITLE"></para></td>
  23. <td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]]</para></td>
  24. </tr>
  25. <tr>
  26. <td><para style="TOP_TITLE"></para></td>
  27. <td><para style="TITLE_CENTER">(Expressed in [[data['form'] and (' %s'%( exchange_name(data['form']))) or '']])</para></td>
  28. </tr>
  29. <tr>
  30. <td><para style="TOP_TITLE"></para></td>
  31. <td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
  32. </tr>
  33. </blockTable>
  34. </place>
  35. <drawRightString x="270mm" y="5mm">Printing Date: [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time=True) ]] [[ get_informe_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/></drawRightString>
  36. </pageGraphics>
  37. </pageTemplate>
  38. </template>
  39. <stylesheet>
  40. <blockTableStyle id="BODY_LINE">
  41. <blockValign value="TOP"/>
  42. <blockAlignment value="RIGHT"/>
  43. <blockTopPadding length="1.0"/>
  44. <blockBottomPadding length="1.0"/>
  45. <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1" thickness='0.25'/>
  46. </blockTableStyle>
  47. <blockTableStyle id="BODY_LINE_FILLED">
  48. <blockBackground colorName="lightgrey" start="0,0" stop="-1,-1"/>
  49. <blockValign value="TOP"/>
  50. <blockAlignment value="RIGHT"/>
  51. <blockTopPadding length="1.0"/>
  52. <blockBottomPadding length="1.0"/>
  53. <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1" thickness='0.25'/>
  54. </blockTableStyle>
  55. <blockTableStyle id="TITLE">
  56. <blockValign value="TOP"/>
  57. </blockTableStyle>
  58. <blockTableStyle id="BODY">
  59. <blockValign value="TOP"/>
  60. <blockAlignment value="RIGHT"/>
  61. <blockTopPadding length="1.0"/>
  62. <blockBottomPadding length="1.0"/>
  63. <lineStyle kind="LINEBELOW" colorName="darkgrey" start="0,0" stop="-1,-1" thickness='0.25'/>
  64. </blockTableStyle>
  65. <blockTableStyle id="BODY_STRIKE">
  66. <blockValign value="TOP"/>
  67. <blockAlignment value="RIGHT"/>
  68. <blockTopPadding length="1.0"/>
  69. <blockBottomPadding length="1.0"/>
  70. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,1" stop="-1,-1" thickness='0.5'/>
  71. </blockTableStyle>
  72. <blockTableStyle id="TOP_TABLE">
  73. <blockAlignment value="LEFT"/>
  74. <blockValign value="TOP"/>
  75. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1" thickness='0.25'/>
  76. </blockTableStyle>
  77. <initialize>
  78. <paraStyle name="all" alignment="justify"/>
  79. </initialize>
  80. <paraStyle
  81. name="TITLE_LEFT_ALIGN_NEW"
  82. fontName="Courier"
  83. fontSize="7.0"
  84. leading="10"
  85. alignment="RIGHT"
  86. spaceBefore="0.0"
  87. spaceAfter="0.0"/>
  88. <paraStyle name="TITLES_NEW"
  89. fontName="Courier"
  90. fontSize="7.0"
  91. leading="10"
  92. alignment="LEFT"
  93. spaceBefore="0.0"
  94. spaceAfter="0.0"/>
  95. <paraStyle name="TITLES_NEW_P"
  96. fontName="Helvetica-Bold"
  97. fontSize="6.0"
  98. leading="10"
  99. alignment="LEFT"
  100. spaceBefore="0.0"
  101. spaceAfter="0.0"/>
  102. <paraStyle name="TITLES_NEW_RIGHT"
  103. fontName="Courier"
  104. fontSize="7.0"
  105. leading="10"
  106. alignment="RIGHT"
  107. spaceBefore="0.0"
  108. spaceAfter="0.0"/>
  109. <paraStyle
  110. name="TITLE_LEFT_ALIGN"
  111. fontName="Helvetica-Bold"
  112. fontSize="7.0"
  113. leading="10"
  114. alignment="RIGHT"
  115. spaceBefore="0.0"
  116. spaceAfter="0.0"/>
  117. <paraStyle name="TOP_TITLE" fontName="Helvetica-Bold" fontSize="7" leftIndent="0.0" alignment="LEFT"/>
  118. <paraStyle
  119. name="TITLES"
  120. fontName="Helvetica-Bold"
  121. fontSize="7.0"
  122. leading="10"
  123. alignment="LEFT"
  124. spaceBefore="0.0"
  125. spaceAfter="0.0"/>
  126. <paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="7" leading="10" leftIndent="0.0" alignment="CENTER"/>
  127. <paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
  128. <paraStyle
  129. name="TITLE"
  130. alignment="CENTER"
  131. fontName="Helvetica"
  132. fontSize="18.0"
  133. leading="20"
  134. spaceBefore="-3.0"
  135. textColor="black"/>
  136. </stylesheet>
  137. <images/>
  138. <story>
  139. <para>[[setLang(user.lang)]]</para>
  140. <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
  141. <tr noRowsplits="0">
  142. <td>
  143. <para style="TITLE_LEFT_ALIGN">
  144. <font>CODE</font>
  145. </para>
  146. </td>
  147. <td>
  148. <para style="TITLES">ACCOUNT</para>
  149. </td>
  150. <td>
  151. <para style="TITLE_LEFT_ALIGN">INITIAL</para>
  152. </td>
  153. <td>
  154. <para style="TITLE_LEFT_ALIGN">DEBIT</para>
  155. </td>
  156. <td>
  157. <para style="TITLE_LEFT_ALIGN">CREDIT</para>
  158. </td>
  159. <td>
  160. <para style="TITLE_LEFT_ALIGN">BALANCE</para>
  161. </td>
  162. </tr>
  163. </blockTable>
  164. <blockTable colWidths="6.0cm,3.0cm,3.0cm,2.5cm,4.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="0">
  165. <!--
  166. [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
  167. -->
  168. <tr noRowsplits="1">
  169. <td>
  170. <para style="TITLES_NEW">
  171. <font>DATE</font>
  172. </para>
  173. </td>
  174. <td>
  175. <para style="TITLES_NEW">
  176. <font>PERIOD</font>
  177. </para>
  178. </td>
  179. <td>
  180. <para style="TITLES_NEW">JOURNAL ENTRY</para>
  181. </td>
  182. <td>
  183. <para style="TITLE_LEFT_ALIGN"></para>
  184. </td>
  185. <td>
  186. <para style="TITLE_LEFT_ALIGN"></para>
  187. </td>
  188. <td>
  189. <para style="TITLE_LEFT_ALIGN"></para>
  190. </td>
  191. <td>
  192. <para style="TITLE_LEFT_ALIGN"></para>
  193. </td>
  194. <td>
  195. <para style="TITLE_LEFT_ALIGN"></para>
  196. </td>
  197. </tr>
  198. </blockTable>
  199. <section>
  200. <para>[[ repeatIn([x for x in lines(data['form']) if x['type'] != 'view'], 'a') ]]</para>
  201. <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
  202. <tr>
  203. <td>
  204. <para style="TITLE_LEFT_ALIGN">
  205. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  206. <i>[[a['label']==True and a['code'] or '' ]]</i>
  207. </para>
  208. </td>
  209. <td>
  210. <para style="TITLES">
  211. <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-Bold"}))) or removeParentNode('font') ]]</font>
  212. <font>[[ a['type']=='view' and a['name'].upper() or a['name'].title() ]]</font>
  213. </para>
  214. </td>
  215. <td>
  216. <para style="TITLE_LEFT_ALIGN">
  217. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  218. <font>[[ (a['total']==True) and formatLang(a['balanceinit'] and a['balanceinit'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']]</font>
  219. </para>
  220. </td>
  221. <td>
  222. <para style="TITLE_LEFT_ALIGN">
  223. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  224. <font>[[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']]</font>
  225. </para>
  226. </td>
  227. <td>
  228. <para style="TITLE_LEFT_ALIGN">
  229. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  230. <font>[[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']]</font>
  231. </para>
  232. </td>
  233. <td>
  234. <para style="TITLE_LEFT_ALIGN">
  235. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  236. <font>[[ (a['total']==True) and formatLang(a['balance'] and a['balance'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']]</font>
  237. </para>
  238. </td>
  239. </tr>
  240. </blockTable>
  241. <section>
  242. <para>[[ repeatIn(a['journal'], 'j') ]]</para>
  243. <blockTable colWidths="6.0cm,3.0cm,3.0cm,2.5cm,4.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
  244. <!--
  245. [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
  246. -->
  247. <tr>
  248. <td>
  249. <para style="TITLES_NEW_P">
  250. <font> [[ formatLang( j['date'], date=True) ]]</font>
  251. </para>
  252. </td>
  253. <td>
  254. <para style="TITLES_NEW_P">
  255. <font>[[ j['period'] ]]</font>
  256. </para>
  257. </td>
  258. <td>
  259. <para style="TITLES_NEW_P">
  260. <font>[[ j['name'] ]] </font>
  261. </para>
  262. </td>
  263. <td>
  264. <para style="TITLES_NEW">
  265. <font></font>
  266. </para>
  267. </td>
  268. <td>
  269. <para style="TITLES_NEW">
  270. <font></font>
  271. </para>
  272. </td>
  273. <td>
  274. <para style="TITLE_LEFT_ALIGN">
  275. </para>
  276. </td>
  277. <td>
  278. <para style="TITLE_LEFT_ALIGN">
  279. </para>
  280. </td>
  281. <td>
  282. <para style="TITLE_LEFT_ALIGN">
  283. </para>
  284. </td>
  285. </tr>
  286. </blockTable>
  287. <section>
  288. <para>[[ repeatIn(j.get('obj').line_id, 'k') ]]</para>
  289. <blockTable colWidths="6.0cm,3.0cm,3.0cm,1.5cm,5.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE_FILLED" repeatRows="1">
  290. <tr>
  291. <td>
  292. <para style="TITLES_NEW">
  293. <font> [[ k.account_id.code == a['code'] and k.name or removeParentNode('blockTable') ]]</font>
  294. </para>
  295. </td>
  296. <td>
  297. <para style="TITLES_NEW">
  298. <font>[[ k.ref and k.ref or '']]</font>
  299. </para>
  300. </td>
  301. <td>
  302. <para style="TITLES_NEW">
  303. <font>[[ k.partner_id and k.partner_id.name or '']]</font>
  304. </para>
  305. </td>
  306. <td>
  307. <para style="TITLES_NEW">
  308. <font>[[ k.account_id and k.account_id.code or '']]</font>
  309. </para>
  310. </td>
  311. <td>
  312. <para style="TITLES_NEW">
  313. <font>[[ k.account_id and k.account_id.name or '']]</font>
  314. </para>
  315. </td>
  316. <td>
  317. <para style="TITLES_NEW_RIGHT">
  318. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  319. <font>[[ k.debit and formatLang(k.debit, digits=2, grouping=True) or '' ]] </font>
  320. </para>
  321. </td>
  322. <td>
  323. <para style="TITLES_NEW_RIGHT">
  324. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  325. <font>[[ k.credit and formatLang(k.credit, digits=2, grouping=True) or '' ]] </font>
  326. </para>
  327. </td>
  328. <td>
  329. <para style="TITLES_NEW_RIGHT">
  330. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  331. <font>[[ k.reconcile_id and k.reconcile_id.name or k.reconcile_partial_id and k.reconcile_partial_id.name or '']]</font>
  332. </para>
  333. </td>
  334. </tr>
  335. </blockTable>
  336. <blockTable colWidths="6.0cm,3.0cm,3.0cm,1.5cm,5.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
  337. <tr>
  338. <td>
  339. <para style="TITLES_NEW">
  340. <font> [[ k.account_id.code != a['code'] and k.name or removeParentNode('blockTable') ]]</font>
  341. </para>
  342. </td>
  343. <td>
  344. <para style="TITLES_NEW">
  345. <font>[[ k.ref and k.ref or '']]</font>
  346. </para>
  347. </td>
  348. <td>
  349. <para style="TITLES_NEW">
  350. <font>[[ k.partner_id and k.partner_id.name or '']]</font>
  351. </para>
  352. </td>
  353. <td>
  354. <para style="TITLES_NEW">
  355. <font>[[ k.account_id and k.account_id.code or '']]</font>
  356. </para>
  357. </td>
  358. <td>
  359. <para style="TITLES_NEW">
  360. <font>[[ k.account_id and k.account_id.name or '']]</font>
  361. </para>
  362. </td>
  363. <td>
  364. <para style="TITLES_NEW_RIGHT">
  365. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  366. <font>[[ k.debit and formatLang(k.debit, digits=2, grouping=True) or '' ]] </font>
  367. </para>
  368. </td>
  369. <td>
  370. <para style="TITLES_NEW_RIGHT">
  371. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  372. <font>[[ k.credit and formatLang(k.credit, digits=2, grouping=True) or '' ]] </font>
  373. </para>
  374. </td>
  375. <td>
  376. <para style="TITLES_NEW_RIGHT">
  377. <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  378. <font>[[ k.reconcile_id and k.reconcile_id.name or k.reconcile_partial_id and k.reconcile_partial_id.name or '']]</font>
  379. </para>
  380. </td>
  381. </tr>
  382. </blockTable>
  383. </section>
  384. <spacer length="1.5mm"/>
  385. </section>
  386. <spacer length="2.5mm"/>
  387. </section>
  388. </story>
  389. </document>