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.

173 lines
8.5 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <template id="partner_statement.activity_statement_document">
  6. <t t-call="web.external_layout">
  7. <t t-set="o" t-value="o.with_context({'lang': lang})" />
  8. <t t-set="address">
  9. <address
  10. t-esc="get_inv_addr(o)"
  11. t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
  12. />
  13. <div t-if="o.vat" class="mt16"><t
  14. t-esc="company.country_id.vat_label or 'Tax ID'"
  15. />: <span t-field="o.vat" /></div>
  16. </t>
  17. <div class="page">
  18. <h2>Statement of Account</h2>
  19. <div id="informations" class="row mt32 mb32">
  20. <div class="col-3 bm-2">
  21. <strong>Date:</strong>
  22. <p t-esc="d['today']" class="m-0" />
  23. </div>
  24. <div class="col-3 bm-2">
  25. <strong>Partner Name:</strong>
  26. <p t-field="o.name" class="m-0" />
  27. </div>
  28. <div t-if="o.ref" class="col-3 bm-2">
  29. <strong>Partner Code:</strong>
  30. <p t-field="o.ref" class="m-0" />
  31. </div>
  32. </div>
  33. <t t-if="d['currencies']">
  34. <br />
  35. <t t-foreach="d['currencies'].items()" t-as="currency">
  36. <t t-set="display_currency" t-value="Currencies[currency[0]]" />
  37. <t t-set="currency" t-value="currency[1]" />
  38. <p>
  39. <span
  40. t-if="account_type == 'payable'"
  41. >Supplier </span>Statement between <span
  42. t-esc="d['start']"
  43. /> and <span t-esc="d['end']" /> in <span
  44. t-esc="display_currency.name"
  45. />
  46. </p>
  47. <table class="table table-condensed table-statement">
  48. <thead>
  49. <tr>
  50. <th>Reference number</th>
  51. <th>Date</th>
  52. <th>Description</th>
  53. <th class="amount">Amount</th>
  54. <th class="amount">Balance</th>
  55. </tr>
  56. </thead>
  57. <tbody>
  58. <tr>
  59. <td />
  60. <td>
  61. <span t-esc="d['start']" />
  62. </td>
  63. <td>
  64. Balance Forward
  65. </td>
  66. <td />
  67. <td class="amount">
  68. <span
  69. t-esc="currency['balance_forward']"
  70. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  71. />
  72. </td>
  73. </tr>
  74. <tr
  75. t-foreach="currency['lines']"
  76. t-as="line"
  77. t-att-class="'statement-blocked' if line['blocked'] else ''"
  78. >
  79. <td>
  80. <span t-esc="line['move_id']" />
  81. </td>
  82. <td>
  83. <span t-esc="line['date']" />
  84. </td>
  85. <td>
  86. <t t-if="line['name'] != '/'">
  87. <t t-if="not line['ref'] and line['name']">
  88. <span t-esc="line['name']" />
  89. </t>
  90. <t t-if="line['ref'] and not line['name']">
  91. <span t-esc="line['ref']" />
  92. </t>
  93. <t t-if="line['ref'] and line['name']">
  94. <t
  95. t-if="line['name'] not in line['ref'] or line['name'] == line['ref']"
  96. >
  97. <span t-esc="line['name']" />
  98. </t>
  99. <t
  100. t-if="line['ref'] not in line['name']"
  101. >
  102. <span t-esc="line['ref']" />
  103. </t>
  104. </t>
  105. </t>
  106. <t t-if="line['name'] == '/'">
  107. <span t-esc="line['ref']" />
  108. </t>
  109. </td>
  110. <td class="amount">
  111. <span
  112. t-esc="line['amount']"
  113. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  114. />
  115. </td>
  116. <td class="amount">
  117. <span
  118. t-esc="line['balance']"
  119. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  120. />
  121. </td>
  122. </tr>
  123. <tr>
  124. <td />
  125. <td>
  126. <span t-esc="d['end']" />
  127. </td>
  128. <td>
  129. Ending Balance
  130. </td>
  131. <td />
  132. <td class="amount">
  133. <span
  134. t-esc="currency['amount_due']"
  135. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  136. />
  137. </td>
  138. </tr>
  139. </tbody>
  140. </table>
  141. <t
  142. t-call="partner_statement.aging_buckets"
  143. t-if="currency['buckets']"
  144. />
  145. </t>
  146. </t>
  147. <p t-if="d.get('no_entries')">
  148. <strong>The partner doesn't have due entries.</strong>
  149. </p>
  150. </div>
  151. </t>
  152. </template>
  153. <template id="activity_statement">
  154. <t t-call="web.html_container">
  155. <t t-foreach="docs" t-as="o">
  156. <t t-set="d" t-value="data.get(o.id)" />
  157. <t
  158. t-call="partner_statement.activity_statement_document"
  159. t-lang="o.lang"
  160. />
  161. </t>
  162. </t>
  163. </template>
  164. <report
  165. id="action_print_activity_statement"
  166. model="res.partner"
  167. report_type="qweb-pdf"
  168. menu="False"
  169. string="Activity Statement"
  170. name="partner_statement.activity_statement"
  171. file="partner_statement.activity_statement"
  172. />
  173. </odoo>