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.

204 lines
14 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:20em">
  13. Activity Statement
  14. </h4>
  15. <p>
  16. Date: <span t-esc="Date[o.id]" /><br/>
  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 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. <table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
  117. <thead>
  118. <tr>
  119. <th class="text-center" style="border-right: 1px solid black;">Current Due</th>
  120. <th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
  121. <th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
  122. <th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
  123. <th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
  124. <th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
  125. <th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
  126. </tr>
  127. </thead>
  128. <tr t-if="currency in Buckets[o.id]">
  129. <td class="text-right" style="border-right: 1px solid black;">
  130. <span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  131. </td>
  132. <td class="text-right" style="border-right: 1px solid black;">
  133. <span t-esc="Buckets[o.id][currency]['b_1_30']" 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_30_60']" 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_60_90']" 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_90_120']" 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_over_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]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  149. </td>
  150. </tr>
  151. <tr t-if="currency not in Buckets[o.id]">
  152. <td class="text-right" style="border-right: 1px solid black;">
  153. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  154. </td>
  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. </tr>
  174. </table>
  175. </t>
  176. </t>
  177. <p t-if="not Lines[o.id]">
  178. <strong>The partner doesn't have due entries.</strong>
  179. </p>
  180. </div>
  181. </div>
  182. </t>
  183. </template>
  184. <template id="statement">
  185. <t t-call="report.html_container">
  186. <t t-foreach="docs" t-as="o">
  187. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  188. <t t-call="customer_activity_statement.statement_document" t-lang="o.lang"/>
  189. </t>
  190. </t>
  191. </t>
  192. </template>
  193. <report id="action_print_customer_activity_statement"
  194. model="res.partner"
  195. report_type="qweb-pdf"
  196. menu="False"
  197. string="Statement Action to PDF"
  198. name="customer_activity_statement.statement"
  199. file="customer_activity_statement.statement"
  200. />
  201. </odoo>