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.

140 lines
7.4 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="get_inv_addr(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.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-if="account_type == 'payable'">Supplier </span>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 t-if="line['name'] == line['ref']">
  76. <span t-esc="line['name']"/>
  77. </t>
  78. </t>
  79. </t>
  80. <t t-if="line['name'] == '/'">
  81. <span t-if="line['ref'] == 'Payment'">Payment</span>
  82. <span t-else="" t-esc="line['ref']"/>
  83. </t>
  84. </td>
  85. <td class="amount">
  86. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  87. </td>
  88. <td class="amount">
  89. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td />
  94. <td>
  95. <span t-esc="d['end']"/>
  96. </td>
  97. <td>
  98. Ending Balance
  99. </td>
  100. <td />
  101. <td class="amount">
  102. <span t-esc="currency['amount_due']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  103. </td>
  104. </tr>
  105. </tbody>
  106. </table>
  107. <t t-call="partner_statement.aging_buckets" t-if="currency['buckets']" />
  108. </t>
  109. </t>
  110. <p t-if="d.get('no_entries')">
  111. <strong>The partner doesn't have due entries.</strong>
  112. </p>
  113. </div>
  114. </t>
  115. </template>
  116. <template id="activity_statement">
  117. <t t-call="web.html_container">
  118. <t t-foreach="docs" t-as="o">
  119. <t t-set="d" t-value="data.get(o.id)" />
  120. <t t-call="partner_statement.activity_statement_document" t-lang="o.lang"/>
  121. </t>
  122. </t>
  123. </template>
  124. <report id="action_print_activity_statement"
  125. model="res.partner"
  126. report_type="qweb-pdf"
  127. menu="False"
  128. string="Activity Statement"
  129. name="partner_statement.activity_statement"
  130. file="partner_statement.activity_statement"
  131. />
  132. </odoo>