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.

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