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.

51 lines
3.5 KiB

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