report_voucher.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <template id="external_layout_boxed" inherit_id="web.external_layout_boxed" primary="True">
  5. <xpath expr="//div[hasclass('o_boxed_header')]" position="replace">
  6. <div class="o_boxed_header">
  7. <div class="row mb8">
  8. <div class="col-3 mb4">
  9. <img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/>
  10. </div>
  11. </div>
  12. </div>
  13. </xpath>
  14. </template>
  15. <template id="report_voucher_document">
  16. <t t-set="o" t-value="o.with_context(lang=lang)" />
  17. <t t-set="company" t-value="o.company_id"/>
  18. <t t-call="l10n_cn.external_layout_boxed">
  19. <div class="page">
  20. <div align="center">
  21. <h2>
  22. <span>记账凭证</span>
  23. </h2>
  24. </div>
  25. <div id="company" class="row col-auto">
  26. <span t-field="o.company_id.name"/>
  27. </div>
  28. <div id="informations" class="row">
  29. <!-- offset intentionally for period -->
  30. <div class="col-3 offset-3" name="date">
  31. <strong>日期:</strong>
  32. <span t-field="o.date"/>
  33. </div>
  34. <div class="col-4" t-if="o.name" name="name">
  35. <strong>凭证号:</strong>
  36. <span t-field="o.name"/>
  37. </div>
  38. <div class="col-2">
  39. <strong>附件数:</strong>
  40. <span t-esc="o._count_attachments()"/>
  41. </div>
  42. </div>
  43. <table class="table table-sm o_main_table table-striped" name="entry_line_table">
  44. <thead>
  45. <tr>
  46. <t t-set="colspan" t-value="4"/>
  47. <th name="th_description" class="text-center"><span>摘要</span></th>
  48. <th name="th_account" class="text-center"><span>科目</span></th>
  49. <th name="th_debit" class="text-center"><span>借方</span></th>
  50. <th name="th_credit" class="text-center"><span>贷方</span></th>
  51. </tr>
  52. </thead>
  53. <tbody class="invoice_tbody">
  54. <t t-set="total_debit" t-value="0"/>
  55. <t t-set="total_credit" t-value="0"/>
  56. <t t-foreach="o.line_ids" t-as="line">
  57. <t t-set="total_debit" t-value="total_debit + line.debit"/>
  58. <t t-set="total_credit" t-value="total_credit + line.credit"/>
  59. <tr>
  60. <t name="account_move_line">
  61. <td name="description">
  62. <span t-field="line.name" t-options="{'widget': 'text'}"/>
  63. </td>
  64. <td name="account">
  65. <span t-field="line.account_id.display_name" t-options="{'widget': 'text'}"/>
  66. </td>
  67. <td name="debit">
  68. <span t-if="line.debit != 0" t-field="line.debit"/>
  69. </td>
  70. <td name="credit">
  71. <span t-if="line.credit != 0" t-field="line.credit"/>
  72. </td>
  73. </t>
  74. </tr>
  75. </t>
  76. <t>
  77. <td name="total" colspan="2">
  78. <span>合计:</span>
  79. <span t-esc="o._convert_to_amount_in_word(total_debit)" />
  80. </td>
  81. <td name="total_debit">
  82. <span t-esc="total_debit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  83. </td>
  84. <td name="total_credit">
  85. <span t-esc="total_credit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  86. </td>
  87. </t>
  88. </tbody>
  89. </table>
  90. <div id="staff" class="row" style="color:black">
  91. <div class="col-4">
  92. <strong>审核:</strong>
  93. </div>
  94. <div class="col-4">
  95. <strong>过账:</strong>
  96. </div>
  97. <div class="col-4">
  98. <strong>制单:</strong>
  99. <span t-esc="o.invoice_user_id.name"/>
  100. </div>
  101. </div>
  102. </div>
  103. </t>
  104. </template>
  105. <template id="report_voucher">
  106. <t t-call="web.html_container">
  107. <t t-foreach="docs" t-as="o">
  108. <t t-call="l10n_cn.report_voucher_document" t-lang="lang"/>
  109. </t>
  110. </t>
  111. </template>
  112. </data>
  113. </odoo>