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.

126 lines
6.7 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.outstanding_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. <p>
  15. Date: <span t-esc="d['today']" /><br/>
  16. <t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
  17. </p>
  18. <t t-if="d['currencies']">
  19. <br/>
  20. <t t-foreach="d['currencies'].items()" t-as="currency">
  21. <t t-set="display_currency" t-value="Currencies[currency[0]]" />
  22. <t t-set="currency" t-value="currency[1]" />
  23. <p>
  24. <span t-esc="'' if account_type == 'receivable' else 'Supplier '"/>Statement up to <span t-esc="d['end']" /> in <span t-esc="display_currency.name"/>
  25. </p>
  26. <table class="table table-sm table-statement">
  27. <thead>
  28. <tr>
  29. <th>Reference number</th>
  30. <th>Date</th>
  31. <th>Due Date</th>
  32. <th>Description</th>
  33. <th class="amount">Original</th>
  34. <th class="amount">Open Amount</th>
  35. <th class="amount">Balance</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <tr t-foreach="currency['lines']" t-as="line" t-att-class="'statement-blocked' if line['blocked'] else ''">
  40. <td>
  41. <span t-esc="line['move_id']"/>
  42. </td>
  43. <td>
  44. <span t-esc="line['date']"/>
  45. </td>
  46. <td>
  47. <span t-esc="line['date_maturity']"/>
  48. </td>
  49. <td>
  50. <t t-if="line['name'] != '/'">
  51. <t t-if="not line['ref']">
  52. <span t-esc="line['name']"/>
  53. </t>
  54. <t t-if="line['ref'] and line['name']">
  55. <t t-if="line['name'] not in line['ref']">
  56. <span t-esc="line['name']"/>
  57. </t>
  58. <t t-if="line['ref'] not in line['name']">
  59. <span t-esc="line['ref']"/>
  60. </t>
  61. </t>
  62. </t>
  63. <t t-if="line['name'] == '/'">
  64. <span t-esc="line['ref']"/>
  65. </t>
  66. </td>
  67. <td class="amount">
  68. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  69. </td>
  70. <td class="amount">
  71. <span t-esc="line['open_amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  72. </td>
  73. <td class="amount">
  74. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td />
  79. <td>
  80. <span t-esc="d['end']"/>
  81. </td>
  82. <td>
  83. Ending Balance
  84. </td>
  85. <td />
  86. <td />
  87. <td />
  88. <td class="amount">
  89. <span t-esc="currency['amount_due']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. <t t-call="partner_statement.aging_buckets" t-if="currency['buckets']" />
  95. </t>
  96. </t>
  97. <p t-if="d.get('no_entries')">
  98. <strong>The partner doesn't have due entries.</strong>
  99. </p>
  100. </div>
  101. </t>
  102. </template>
  103. <template id="outstanding_statement">
  104. <t t-call="web.html_container">
  105. <t t-foreach="docs" t-as="o">
  106. <t t-set="d" t-value="data.get(o.id)" />
  107. <t t-call="partner_statement.outstanding_statement_document" t-lang="o.lang"/>
  108. </t>
  109. </t>
  110. </template>
  111. <report id="action_print_outstanding_statement"
  112. model="res.partner"
  113. report_type="qweb-pdf"
  114. menu="False"
  115. string="Outstanding Statement"
  116. name="partner_statement.outstanding_statement"
  117. file="partner_statement.outstanding_statement"
  118. />
  119. </odoo>