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.

167 lines
7.9 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <odoo>
  3. <template id="vat_report">
  4. <t t-call="web.html_container">
  5. <t t-foreach="docs" t-as="o">
  6. <t t-call="account_financial_report.internal_layout">
  7. <t t-call="account_financial_report.report_vat_report_base" />
  8. </t>
  9. </t>
  10. </t>
  11. </template>
  12. <template id="account_financial_report.report_vat_report_base">
  13. <t t-set="title">VAT Report - <t t-raw="company_name" /> - <t
  14. t-raw="currency_name"
  15. /></t>
  16. <t t-set="company_name" t-value="company_name" />
  17. <div class="page">
  18. <div class="row">
  19. <h4
  20. class="mt0"
  21. t-esc="title or 'Odoo Report'"
  22. style="text-align: center;"
  23. />
  24. </div>
  25. <!-- Display filters -->
  26. <t t-call="account_financial_report.report_vat_report_filters" />
  27. <div class="page_break" />
  28. <div class="act_as_table data_table" style="width: 100%;">
  29. <!-- Display table headers for lines -->
  30. <div class="act_as_thead">
  31. <div class="act_as_row labels">
  32. <!--## code-->
  33. <div
  34. class="act_as_cell first_column"
  35. style="width: 5%;"
  36. >Code</div>
  37. <!--## name-->
  38. <div class="act_as_cell" style="width: 65%;">Name</div>
  39. <!--## net-->
  40. <div class="act_as_cell" style="width: 15%;">Net</div>
  41. <!--## tax-->
  42. <div class="act_as_cell" style="width: 15%;">Tax</div>
  43. </div>
  44. </div>
  45. <t t-foreach="vat_report" t-as="tag_or_group">
  46. <div class="act_as_row lines" style="font-weight: bold;">
  47. <div
  48. class="act_as_cell left oe_tooltip_string"
  49. style="width: 5%;"
  50. >
  51. <span
  52. t-att-res-id="res_id"
  53. t-att-res-model="res_model"
  54. view-type="form"
  55. >
  56. <t t-att-style="style" t-raw="tag_or_group['code']" />
  57. </span>
  58. </div>
  59. <div
  60. class="act_as_cell left oe_tooltip_string"
  61. style="width: 65%;"
  62. >
  63. <span
  64. t-att-res-id="res_id"
  65. t-att-res-model="res_model"
  66. view-type="form"
  67. >
  68. <t t-att-style="style" t-raw="tag_or_group['name']" />
  69. </span>
  70. </div>
  71. <div class="act_as_cell amount" style="width: 15%;">
  72. <t
  73. t-att-style="style"
  74. t-raw="tag_or_group['net']"
  75. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  76. />
  77. </div>
  78. <div class="act_as_cell amount" style="width: 15%;">
  79. <t
  80. t-att-style="style"
  81. t-raw="tag_or_group['tax']"
  82. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  83. />
  84. </div>
  85. </div>
  86. <t t-if="tax_detail">
  87. <t t-foreach="tag_or_group['taxes']" t-as="tax">
  88. <div class="act_as_row lines">
  89. <div class="act_as_cell" style="width: 5%;" />
  90. <div
  91. class="act_as_cell left oe_tooltip_string"
  92. style="padding-left: 20px; width: 65%;"
  93. >
  94. <span
  95. t-att-res-id="tax['id']"
  96. t-att-res-model="res_model"
  97. view-type="form"
  98. >
  99. <t t-att-style="style" t-raw="tax['name']" />
  100. </span>
  101. </div>
  102. <div class="act_as_cell amount" style="width: 15%;">
  103. <t
  104. t-set="domain"
  105. t-value="[('tax_ids', 'in', tax['id']),
  106. ('date', '&gt;=', date_from),
  107. ('date', '&lt;=', date_to),
  108. ('tax_exigible', '=', True)]"
  109. />
  110. <span
  111. t-att-domain="domain"
  112. res-model="account.move.line"
  113. >
  114. <t
  115. t-att-style="style"
  116. t-raw="tax['net']"
  117. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  118. />
  119. </span>
  120. </div>
  121. <div class="act_as_cell amount" style="width: 15%;">
  122. <t
  123. t-set="domain"
  124. t-value="[('tax_line_id', '=', tax['id']),
  125. ('date', '&gt;=', date_from),
  126. ('date', '&lt;=', date_to),
  127. ('tax_exigible', '=', True)]"
  128. />
  129. <span
  130. t-att-domain="domain"
  131. res-model="account.move.line"
  132. >
  133. <t
  134. t-att-style="style"
  135. t-raw="tax['tax']"
  136. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  137. />
  138. </span>
  139. </div>
  140. </div>
  141. </t>
  142. </t>
  143. </t>
  144. </div>
  145. </div>
  146. </template>
  147. <template id="account_financial_report.report_vat_report_filters">
  148. <div class="act_as_table data_table" style="width: 100%;">
  149. <div class="act_as_row labels">
  150. <div class="act_as_cell">Date From</div>
  151. <div class="act_as_cell">Date To</div>
  152. <div class="act_as_cell">Based On</div>
  153. </div>
  154. <div class="act_as_row">
  155. <div class="act_as_cell">
  156. <span t-esc="date_from" />
  157. </div>
  158. <div class="act_as_cell">
  159. <span t-esc="date_to" />
  160. </div>
  161. <div class="act_as_cell">
  162. <span t-esc="based_on" />
  163. </div>
  164. </div>
  165. </div>
  166. </template>
  167. </odoo>