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.

130 lines
6.8 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. <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 between <span t-esc="d['start']" /> and <span t-esc="d['end']" /> in <span t-esc="display_currency.name"/>
  25. </p>
  26. <table class="table table-condensed table-statement">
  27. <thead>
  28. <tr>
  29. <th>Reference number</th>
  30. <th>Date</th>
  31. <th>Description</th>
  32. <th class="amount">Amount</th>
  33. <th class="amount">Balance</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <tr>
  38. <td />
  39. <td>
  40. <span t-esc="d['start']"/>
  41. </td>
  42. <td>
  43. Balance Forward
  44. </td>
  45. <td />
  46. <td class="amount">
  47. <span t-esc="currency['balance_forward']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  48. </td>
  49. </tr>
  50. <tr t-foreach="currency['lines']" t-as="line" t-att-class="'statement-blocked' if line['blocked'] else ''">
  51. <td>
  52. <span t-esc="line['move_id']"/>
  53. </td>
  54. <td>
  55. <span t-esc="line['date']"/>
  56. </td>
  57. <td>
  58. <t t-if="line['name'] != '/'">
  59. <t t-if="not line['ref']">
  60. <span t-esc="line['name']"/>
  61. </t>
  62. <t t-if="line['ref'] and line['name']">
  63. <t t-if="line['name'] not in line['ref']">
  64. <span t-esc="line['name']"/>
  65. </t>
  66. <t t-if="line['ref'] not in line['name']">
  67. <span t-esc="line['ref']"/>
  68. </t>
  69. </t>
  70. </t>
  71. <t t-if="line['name'] == '/'">
  72. <span t-esc="line['ref']"/>
  73. </t>
  74. </td>
  75. <td class="amount">
  76. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  77. </td>
  78. <td class="amount">
  79. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td />
  84. <td>
  85. <span t-esc="d['end']"/>
  86. </td>
  87. <td>
  88. Ending Balance
  89. </td>
  90. <td />
  91. <td class="amount">
  92. <span t-esc="currency['amount_due']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  93. </td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. <t t-call="partner_statement.aging_buckets" t-if="currency['buckets']" />
  98. </t>
  99. </t>
  100. <p t-if="d.get('no_entries')">
  101. <strong>The partner doesn't have due entries.</strong>
  102. </p>
  103. </div>
  104. </t>
  105. </template>
  106. <template id="activity_statement">
  107. <t t-call="web.html_container">
  108. <t t-foreach="docs" t-as="o">
  109. <t t-set="d" t-value="data.get(o.id)" />
  110. <t t-call="partner_statement.activity_statement_document" t-lang="o.lang"/>
  111. </t>
  112. </t>
  113. </template>
  114. <report id="action_print_activity_statement"
  115. model="res.partner"
  116. report_type="qweb-pdf"
  117. menu="False"
  118. string="Activity Statement"
  119. name="partner_statement.activity_statement"
  120. file="partner_statement.activity_statement"
  121. />
  122. </odoo>