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.

207 lines
15 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="customer_activity_statement.statement_document">
  4. <t t-call="report.external_layout">
  5. <div class="page">
  6. <div class="row">
  7. <div class="col-xs-5 col-xs-offset-7">
  8. <span t-field="o.name"/><br/>
  9. <span t-raw="o._address_display(None, None)[o.id].replace('\n\n', '\n').replace('\n', '&lt;br&gt;')"/>
  10. <span t-field="o.vat"/>
  11. </div>
  12. <h4 style="padding-left:15em;padding-top:2em">
  13. Activity Statement
  14. </h4>
  15. <p>
  16. Date: <span t-esc="Date[o.id]" /><br/><!--Today-->
  17. <t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
  18. </p>
  19. <t t-if="Lines[o.id]">
  20. <br/>
  21. <t t-foreach="Lines[o.id]" t-as="currency">
  22. <br t-if="not currency_first" />
  23. <p>
  24. Activity Statement between <span t-esc="Date_start[o.id]" /> and <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  25. </p>
  26. <table class="table table-condensed" style="border: 1px solid black; border-collapse: collapse;">
  27. <thead>
  28. <tr>
  29. <th style="border-right: 1px solid black;">Reference number</th>
  30. <th class="text-center" style="border-right: 1px solid black;">Date</th>
  31. <th style="border-right: 1px solid black;">Description</th>
  32. <th class="text-right" style="border-right: 1px solid black;">Amount</th>
  33. <th class="text-right" style="border-right: 1px solid black;">Balance</th>
  34. </tr>
  35. </thead>
  36. <tr>
  37. <td style="border-right: 1px solid black;"></td>
  38. <td style="border-right: 1px solid black;">
  39. <span t-esc="Date_start[o.id]"/>
  40. </td>
  41. <td style="border-right: 1px solid black;">
  42. Balance Forward
  43. </td>
  44. <td style="border-right: 1px solid black;"></td>
  45. <td class="text-right" t-if="currency in Balance_forward[o.id]" style="border-right: 1px solid black;">
  46. <span t-esc="Balance_forward[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  47. </td>
  48. <td class="text-right" t-if="currency not in Balance_forward[o.id]" style="border-right: 1px solid black;">
  49. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  50. </td>
  51. </tr>
  52. <tr t-foreach="Lines[o.id][currency]" t-as="line">
  53. <t t-if="not line['blocked']">
  54. <td style="border-right: 1px solid black;">
  55. <span t-esc="line['move_id']"/>
  56. </td>
  57. <td style="border-right: 1px solid black;">
  58. <span t-esc="line['date']"/>
  59. </td>
  60. <td style="border-right: 1px solid black;">
  61. <t t-if="line['name'] != '/'">
  62. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  63. <t t-if="line['ref'] and line['name']">
  64. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  65. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  66. </t>
  67. </t>
  68. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  69. </td>
  70. <td class="text-right" style="border-right: 1px solid black;">
  71. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  72. </td>
  73. <td class="text-right" style="border-right: 1px solid black;">
  74. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  75. </td>
  76. </t>
  77. <t t-if="line['blocked']">
  78. <td style="border-right: 1px solid black; background-color: grey;">
  79. <span t-esc="line['move_id']"/>
  80. </td>
  81. <td style="border-right: 1px solid black; background-color: grey;">
  82. <span t-esc="line['date']"/>
  83. </td>
  84. <td style="border-right: 1px solid black; background-color: grey;">
  85. <t t-if="line['name'] != '/'">
  86. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  87. <t t-if="line['ref'] and line['name']">
  88. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  89. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  90. </t>
  91. </t>
  92. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  93. </td>
  94. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  95. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  96. </td>
  97. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  98. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  99. </td>
  100. </t>
  101. </tr>
  102. <tr>
  103. <td style="border-right: 1px solid black;"></td>
  104. <td style="border-right: 1px solid black;">
  105. <span t-esc="Date_end[o.id]"/>
  106. </td>
  107. <td style="border-right: 1px solid black;">
  108. Ending Balance
  109. </td>
  110. <td style="border-right: 1px solid black;"></td>
  111. <td class="text-right" style="border-right: 1px solid black;">
  112. <span t-esc="Amount_Due[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  113. </td>
  114. </tr>
  115. </table>
  116. <p>
  117. Aging Report at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  118. </p>
  119. <table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
  120. <thead>
  121. <tr>
  122. <th class="text-center" style="border-right: 1px solid black;">Current Due</th>
  123. <th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
  124. <th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
  125. <th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
  126. <th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
  127. <th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
  128. <th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
  129. </tr>
  130. </thead>
  131. <tr t-if="currency in Buckets[o.id]">
  132. <td class="text-right" style="border-right: 1px solid black;">
  133. <span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  134. </td>
  135. <td class="text-right" style="border-right: 1px solid black;">
  136. <span t-esc="Buckets[o.id][currency]['b_1_30']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  137. </td>
  138. <td class="text-right" style="border-right: 1px solid black;">
  139. <span t-esc="Buckets[o.id][currency]['b_30_60']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  140. </td>
  141. <td class="text-right" style="border-right: 1px solid black;">
  142. <span t-esc="Buckets[o.id][currency]['b_60_90']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  143. </td>
  144. <td class="text-right" style="border-right: 1px solid black;">
  145. <span t-esc="Buckets[o.id][currency]['b_90_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  146. </td>
  147. <td class="text-right" style="border-right: 1px solid black;">
  148. <span t-esc="Buckets[o.id][currency]['b_over_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  149. </td>
  150. <td class="text-right" style="border-right: 1px solid black;">
  151. <span t-esc="Buckets[o.id][currency]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  152. </td>
  153. </tr>
  154. <tr t-if="currency not in Buckets[o.id]">
  155. <td class="text-right" style="border-right: 1px solid black;">
  156. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  157. </td>
  158. <td class="text-right" style="border-right: 1px solid black;">
  159. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  160. </td>
  161. <td class="text-right" style="border-right: 1px solid black;">
  162. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  163. </td>
  164. <td class="text-right" style="border-right: 1px solid black;">
  165. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  166. </td>
  167. <td class="text-right" style="border-right: 1px solid black;">
  168. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  169. </td>
  170. <td class="text-right" style="border-right: 1px solid black;">
  171. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  172. </td>
  173. <td class="text-right" style="border-right: 1px solid black;">
  174. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  175. </td>
  176. </tr>
  177. </table>
  178. </t>
  179. </t>
  180. <p t-if="not Lines[o.id]">
  181. <strong>The partner doesn't have due entries.</strong>
  182. </p>
  183. </div>
  184. </div>
  185. </t>
  186. </template>
  187. <template id="statement">
  188. <t t-call="report.html_container">
  189. <t t-foreach="docs" t-as="o">
  190. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  191. <t t-call="customer_activity_statement.statement_document" t-lang="o.lang"/>
  192. </t>
  193. </t>
  194. </t>
  195. </template>
  196. <report id="action_print_customer_activity_statement"
  197. model="res.partner"
  198. report_type="qweb-pdf"
  199. menu="False"
  200. string="Statement Action to PDF"
  201. name="customer_activity_statement.statement"
  202. file="customer_activity_statement.statement"
  203. />
  204. </odoo>