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.

136 lines
7.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2018 Eficent Business and IT Consulting Services S.L.
  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 t-esc="o" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
  10. <div t-if="o.vat" class="mt16"><t t-esc="company.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
  11. </t>
  12. <div class="page">
  13. <h2 >Statement of Account</h2>
  14. <div id="informations" class="row mt32 mb32">
  15. <div class="col-3 bm-2">
  16. <strong>Date:</strong>
  17. <p t-esc="d['today']" class="m-0"/>
  18. </div>
  19. <div t-if="o.ref" class="col-3 bm-2">
  20. <strong>Partner Code:</strong>
  21. <p t-field="o.ref" class="m-0" />
  22. </div>
  23. </div>
  24. <t t-if="d['currencies']">
  25. <br/>
  26. <t t-foreach="d['currencies'].items()" t-as="currency">
  27. <t t-set="display_currency" t-value="Currencies[currency[0]]" />
  28. <t t-set="currency" t-value="currency[1]" />
  29. <p>
  30. <span t-esc="'' if account_type == 'receivable' else 'Supplier '"/>Statement between <span t-esc="d['start']" /> and <span t-esc="d['end']" /> in <span t-esc="display_currency.name"/>
  31. </p>
  32. <table class="table table-condensed table-statement">
  33. <thead>
  34. <tr>
  35. <th>Reference number</th>
  36. <th>Date</th>
  37. <th>Description</th>
  38. <th class="amount">Amount</th>
  39. <th class="amount">Balance</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <tr>
  44. <td />
  45. <td>
  46. <span t-esc="d['start']"/>
  47. </td>
  48. <td>
  49. Balance Forward
  50. </td>
  51. <td />
  52. <td class="amount">
  53. <span t-esc="currency['balance_forward']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  54. </td>
  55. </tr>
  56. <tr t-foreach="currency['lines']" t-as="line" t-att-class="'statement-blocked' if line['blocked'] else ''">
  57. <td>
  58. <span t-esc="line['move_id']"/>
  59. </td>
  60. <td>
  61. <span t-esc="line['date']"/>
  62. </td>
  63. <td>
  64. <t t-if="line['name'] != '/'">
  65. <t t-if="not line['ref']">
  66. <span t-esc="line['name']"/>
  67. </t>
  68. <t t-if="line['ref'] and line['name']">
  69. <t t-if="line['name'] not in line['ref']">
  70. <span t-esc="line['name']"/>
  71. </t>
  72. <t t-if="line['ref'] not in line['name']">
  73. <span t-esc="line['ref']"/>
  74. </t>
  75. </t>
  76. </t>
  77. <t t-if="line['name'] == '/'">
  78. <span t-esc="line['ref']"/>
  79. </t>
  80. </td>
  81. <td class="amount">
  82. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  83. </td>
  84. <td class="amount">
  85. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td />
  90. <td>
  91. <span t-esc="d['end']"/>
  92. </td>
  93. <td>
  94. Ending Balance
  95. </td>
  96. <td />
  97. <td class="amount">
  98. <span t-esc="currency['amount_due']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  99. </td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <t t-call="partner_statement.aging_buckets" t-if="currency['buckets']" />
  104. </t>
  105. </t>
  106. <p t-if="d.get('no_entries')">
  107. <strong>The partner doesn't have due entries.</strong>
  108. </p>
  109. </div>
  110. </t>
  111. </template>
  112. <template id="activity_statement">
  113. <t t-call="web.html_container">
  114. <t t-foreach="docs" t-as="o">
  115. <t t-set="d" t-value="data.get(o.id)" />
  116. <t t-call="partner_statement.activity_statement_document" t-lang="o.lang"/>
  117. </t>
  118. </t>
  119. </template>
  120. <report id="action_print_activity_statement"
  121. model="res.partner"
  122. report_type="qweb-pdf"
  123. menu="False"
  124. string="Activity Statement"
  125. name="partner_statement.activity_statement"
  126. file="partner_statement.activity_statement"
  127. />
  128. </odoo>