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.

242 lines
11 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="account_financial_report.report_open_items_qweb">
  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_open_items_base"/>
  8. </t>
  9. </t>
  10. </t>
  11. </template>
  12. <template id="account_financial_report.report_open_items_base">
  13. <!-- Saved flag fields into variables, used to define columns display -->
  14. <t t-set="has_second_currency" t-value="o.has_second_currency"/>
  15. <!-- Defines global variables used by internal layout -->
  16. <t t-set="title">Open Items</t>
  17. <t t-set="company_name" t-value="o.company_id.name"/>
  18. <div class="page">
  19. <!-- Display filters -->
  20. <t t-call="account_financial_report.report_open_items_filters"/>
  21. <t t-foreach="o.account_ids" t-as="account">
  22. <div class="page_break">
  23. <!-- Display account header -->
  24. <div class="act_as_table list_table" style="margin-top: 10px;"/>
  25. <div class="act_as_caption account_title"
  26. style="width: 100%;">
  27. <span t-field="account.code"/>
  28. -
  29. <span t-field="account.name"/>
  30. </div>
  31. <!-- Display account partners -->
  32. <t t-foreach="account.partner_ids" t-as="partner">
  33. <div class="page_break">
  34. <!-- Display partner header -->
  35. <div class="act_as_caption account_title">
  36. <span t-field="partner.name"/>
  37. </div>
  38. <!-- Display partner move lines -->
  39. <t t-call="account_financial_report.report_open_items_lines"/>
  40. <!-- Display partner footer -->
  41. <t t-call="account_financial_report.report_open_items_ending_cumul">
  42. <t t-set="account_or_partner_object" t-value="partner"/>
  43. <t t-set="type" t-value='"partner_type"'/>
  44. </t>
  45. </div>
  46. </t>
  47. <!-- Display account footer -->
  48. <t t-call="account_financial_report.report_open_items_ending_cumul">
  49. <t t-set="account_or_partner_object" t-value="account"/>
  50. <t t-set="type" t-value='"account_type"'/>
  51. </t>
  52. </div>
  53. </t>
  54. </div>
  55. </template>
  56. <template id="account_financial_report.report_open_items_filters">
  57. <div class="act_as_table data_table" style="width: 100%;">
  58. <div class="act_as_row labels">
  59. <div class="act_as_cell">Date at filter</div>
  60. <div class="act_as_cell">Target moves filter</div>
  61. <div class="act_as_cell">Account balance at 0 filter</div>
  62. </div>
  63. <div class="act_as_row">
  64. <div class="act_as_cell">
  65. <span t-field="o.date_at"/>
  66. </div>
  67. <div class="act_as_cell">
  68. <t t-if="o.only_posted_moves">All posted entries</t>
  69. <t t-if="not o.only_posted_moves">All entries</t>
  70. </div>
  71. <div class="act_as_cell">
  72. <t t-if="o.hide_account_balance_at_0">Hide</t>
  73. <t t-if="not o.hide_account_balance_at_0">Show</t>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. <template id="account_financial_report.report_open_items_lines">
  79. <div class="act_as_table data_table" style="width: 100%;">
  80. <!-- Display table headers for lines -->
  81. <div class="act_as_thead">
  82. <div class="act_as_row labels">
  83. <!--## date-->
  84. <div class="act_as_cell first_column" style="width: 6.76%;">
  85. Date</div>
  86. <!--## move-->
  87. <div class="act_as_cell" style="width: 9.76%;">Entry</div>
  88. <!--## journal-->
  89. <div class="act_as_cell" style="width: 4.78%;">Journal</div>
  90. <!--## account code-->
  91. <div class="act_as_cell" style="width: 5.38%;">Account</div>
  92. <!--## partner-->
  93. <div class="act_as_cell" style="width: 12.0%;">Partner
  94. </div>
  95. <!--## ref - label-->
  96. <div class="act_as_cell" style="width: 25.5%;">Ref -
  97. Label</div>
  98. <!--## date_due-->
  99. <div class="act_as_cell" style="width: 6.47%;">Due
  100. date</div>
  101. <!--## amount_total_due-->
  102. <div class="act_as_cell" style="width: 6.57%;">Original
  103. </div>
  104. <!--## amount_residual-->
  105. <div class="act_as_cell" style="width: 6.57%;">Residual</div>
  106. <!--## currency_name-->
  107. <div class="act_as_cell" style="width: 3.07%;">Cur.</div>
  108. <!--## amount_total_due_currency-->
  109. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
  110. <!--## amount_residual_currency-->
  111. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Residual</div>
  112. </div>
  113. </div>
  114. <!-- Display each lines -->
  115. <t t-foreach="partner.move_line_ids" t-as="line">
  116. <!-- # lines or centralized lines -->
  117. <div class="act_as_row lines">
  118. <!--## date-->
  119. <div class="act_as_cell left">
  120. <span t-field="line.date"/>
  121. </div>
  122. <!--## move-->
  123. <div class="act_as_cell left">
  124. <t t-set="res_model" t-value="'account.move'"/>
  125. <span>
  126. <a t-att-data-active-id="line.move_line_id.move_id.id"
  127. t-att-data-res-model="res_model"
  128. class="o_account_financial_reports_web_action"
  129. style="color: black;">
  130. <t t-raw="line.entry"/>
  131. </a>
  132. </span>
  133. </div>
  134. <!--## journal-->
  135. <div class="act_as_cell left">
  136. <span t-field="line.journal"/>
  137. </div>
  138. <!--## account code-->
  139. <div class="act_as_cell left">
  140. <span t-field="line.account"/>
  141. </div>
  142. <!--## partner-->
  143. <div class="act_as_cell left">
  144. <t t-set="res_model" t-value="'res.partner'"/>
  145. <span t-if="line.partner">
  146. <a t-att-data-active-id="line.move_line_id.partner_id.id"
  147. t-att-data-res-model="res_model"
  148. class="o_account_financial_reports_web_action"
  149. style="color: black;">
  150. <t t-raw="line.partner"/>
  151. </a>
  152. </span>
  153. </div>
  154. <!--## ref - label-->
  155. <div class="act_as_cell left">
  156. <span t-field="line.label"/>
  157. </div>
  158. <!--## date_due-->
  159. <div class="act_as_cell left">
  160. <span t-field="line.date_due"/>
  161. </div>
  162. <!--## amount_total_due-->
  163. <div class="act_as_cell amount">
  164. <span t-field="line.amount_total_due"/>
  165. </div>
  166. <!--## amount_residual-->
  167. <div class="act_as_cell amount">
  168. <span t-field="line.amount_residual"/>
  169. </div>
  170. <!--## currency_name-->
  171. <div class="act_as_cell">
  172. <span t-field="line.currency_name"/>
  173. </div>
  174. <t t-if="line.currency_name">
  175. <!--## amount_total_due_currency-->
  176. <div class="act_as_cell amount">
  177. <span t-field="line.amount_total_due_currency"/>
  178. </div>
  179. <!--## amount_residual_currency-->
  180. <div class="act_as_cell amount">
  181. <span t-field="line.amount_residual_currency"/>
  182. </div>
  183. </t>
  184. <t t-if="not line.currency_name">
  185. <!--## amount_total_due_currency-->
  186. <div class="act_as_cell"/>
  187. <!--## amount_residual_currency-->
  188. <div class="act_as_cell"/>
  189. </t>
  190. </div>
  191. </t>
  192. </div>
  193. </template>
  194. <template id="account_financial_report.report_open_items_ending_cumul">
  195. <!-- Display ending balance line for account or partner -->
  196. <div class="act_as_table list_table" style="width: 100%;">
  197. <div class="act_as_row labels" style="font-weight: bold;">
  198. <!--## date-->
  199. <t t-if='type == "account_type"'>
  200. <div class="act_as_cell first_column" style="width: 34.3%;">
  201. <span t-field="account_or_partner_object.code"/>
  202. -
  203. <span t-field="account_or_partner_object.name"/>
  204. </div>
  205. <div class="act_as_cell right" style="width: 26.4%;">Ending
  206. balance</div>
  207. </t>
  208. <t t-if='type == "partner_type"'>
  209. <div class="act_as_cell first_column"
  210. style="width: 34.3%;"/>
  211. <div class="act_as_cell right"
  212. style="width: 26.4%;">Partner ending balance</div>
  213. </t>
  214. <!--## date_due-->
  215. <div class="act_as_cell" style="width: 6.26%;"/>
  216. <!--## amount_total_due-->
  217. <div class="act_as_cell amount" style="width: 7.57%;"/>
  218. <!--## amount_currency-->
  219. <div class="act_as_cell amount" style="width: 7.57%;">
  220. <span t-field="account_or_partner_object.final_amount_residual"/>
  221. </div>
  222. <!--## currency_name + amount_total_due_currency + amount_residual_currency -->
  223. <div class="act_as_cell" style="width: 17.90%;"/>
  224. </div>
  225. </div>
  226. </template>
  227. </odoo>