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.

49 lines
3.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <template id="report_financial" inherit_id="account.report_financial">
  4. <!-- replace all tables for different selections and do it in one table /-->
  5. <!-- with credit/debit /-->
  6. <xpath expr="//div[hasclass('page')]/table" position="replace" />
  7. <!-- unfiltered without credit/debit /-->
  8. <xpath expr="//div[hasclass('page')]/table" position="replace" />
  9. <!-- filtered without credit/debit /-->
  10. <xpath expr="//div[hasclass('page')]/table" position="replace">
  11. <div class="row">
  12. <div class="col-xs-6" t-foreach="[data['get_left_lines'], data['get_right_lines']]" t-as="get_lines_function">
  13. <table class="table table-condensed">
  14. <thead>
  15. <tr>
  16. <th>Name</th>
  17. <th class="text-right" t-if="data['debit_credit'] == 1">Debit</th>
  18. <th class="text-right" t-if="data['debit_credit'] == 1">Credit</th>
  19. <th class="text-right">Balance</th>
  20. <th class="text-right" t-if="data['enable_filter'] == 1 and not data['debit_credit']"><span t-esc="data['label_filter']"/></th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <tr t-foreach="get_lines_function(data)" t-as="a">
  25. <t t-if="a['level'] != 0">
  26. <t t-if="a.get('level') &gt; 3"><t t-set="style" t-value="'font-weight: normal;'"/></t>
  27. <t t-if="not a.get('level') &gt; 3"><t t-set="style" t-value="'font-weight: bold;'"/></t>
  28. <td>
  29. <span style="color: white;" t-esc="'..' * a.get('level', 0)"/>
  30. <span t-att-style="style" t-esc="a.get('name')"/>
  31. </td>
  32. <td class="text-right" style="white-space: nowrap;" t-if="['debit_credit'] == 1">
  33. <span t-att-style="style" t-esc="a.get('debit')" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
  34. </td>
  35. <td class="text-right" style="white-space: nowrap;" t-if="data['debit_credit'] == 1">
  36. <span t-att-style="style" t-esc="a.get('credit')" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
  37. </td>
  38. <td class="text-right"><span t-att-style="style" t-esc="a.get('balance')" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></td>
  39. <td class="text-right" t-if="data['enable_filter'] == 1 and not data['debit_credit']"><span t-att-style="style" t-esc="a.get('balance_cmp')" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/></td>
  40. </t>
  41. </tr>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. </xpath>
  47. </template>
  48. </odoo>