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.

271 lines
13 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="foreign_currency" t-value="o.foreign_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_at_0">Hide</t>
  73. <t t-if="not o.hide_account_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: 4.51%;">
  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: 15.07%;">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. <t t-if="foreign_currency">
  107. <!--## currency_name-->
  108. <div class="act_as_cell" style="width: 2.25%;">Cur.</div>
  109. <!--## amount_total_due_currency-->
  110. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
  111. <!--## amount_residual_currency-->
  112. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Residual</div>
  113. </t>
  114. </div>
  115. </div>
  116. <!-- Display each lines -->
  117. <t t-foreach="partner.move_line_ids" t-as="line">
  118. <!-- # lines or centralized lines -->
  119. <div class="act_as_row lines">
  120. <!--## date-->
  121. <div class="act_as_cell left">
  122. <span t-field="line.date"/>
  123. </div>
  124. <!--## move-->
  125. <div class="act_as_cell left">
  126. <t t-set="res_model" t-value="'account.move'"/>
  127. <span>
  128. <a t-att-data-active-id="line.move_line_id.move_id.id"
  129. t-att-data-res-model="res_model"
  130. class="o_account_financial_reports_web_action"
  131. style="color: black;">
  132. <t t-raw="line.entry"/>
  133. </a>
  134. </span>
  135. </div>
  136. <!--## journal-->
  137. <div class="act_as_cell left">
  138. <span t-field="line.journal"/>
  139. </div>
  140. <!--## account code-->
  141. <div class="act_as_cell left">
  142. <span t-field="line.account"/>
  143. </div>
  144. <!--## partner-->
  145. <div class="act_as_cell left">
  146. <t t-set="res_model" t-value="'res.partner'"/>
  147. <span t-if="line.partner">
  148. <a t-att-data-active-id="line.move_line_id.partner_id.id"
  149. t-att-data-res-model="res_model"
  150. class="o_account_financial_reports_web_action"
  151. style="color: black;">
  152. <t t-raw="line.partner"/>
  153. </a>
  154. </span>
  155. </div>
  156. <!--## ref - label-->
  157. <div class="act_as_cell left">
  158. <span t-field="line.label"/>
  159. </div>
  160. <!--## date_due-->
  161. <div class="act_as_cell left">
  162. <span t-field="line.date_due"/>
  163. </div>
  164. <!--## amount_total_due-->
  165. <div class="act_as_cell amount">
  166. <span t-field="line.amount_total_due" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  167. </div>
  168. <!--## amount_residual-->
  169. <div class="act_as_cell amount">
  170. <span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  171. </div>
  172. <t t-if="foreign_currency">
  173. <t t-if="line.currency_id.id">
  174. <!--## currency_name-->
  175. <div class="act_as_cell amount">
  176. <span t-field="line.currency_id.display_name"/>
  177. </div>
  178. <!--## amount_total_due_currency-->
  179. <div class="act_as_cell amount">
  180. <span t-field="line.amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  181. </div>
  182. <!--## amount_residual_currency-->
  183. <div class="act_as_cell amount">
  184. <span t-field="line.amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  185. </div>
  186. </t>
  187. <t t-if="not line.currency_id.id">
  188. <!--## currency_name-->
  189. <div class="act_as_cell"/>
  190. <!--## amount_total_due_currency-->
  191. <div class="act_as_cell"/>
  192. <!--## amount_residual_currency-->
  193. <div class="act_as_cell"/>
  194. </t>
  195. </t>
  196. </div>
  197. </t>
  198. </div>
  199. </template>
  200. <template id="account_financial_report.report_open_items_ending_cumul">
  201. <!-- Display ending balance line for account or partner -->
  202. <div class="act_as_table list_table" style="width: 100%;">
  203. <div class="act_as_row labels" style="font-weight: bold;">
  204. <!--## date-->
  205. <t t-if='type == "account_type"'>
  206. <div class="act_as_cell first_column" style="width: 36.34%;">
  207. <span t-field="account_or_partner_object.code"/>
  208. -
  209. <span t-field="account_or_partner_object.name"/>
  210. </div>
  211. <div class="act_as_cell right" style="width: 28.66%;">Ending
  212. balance</div>
  213. </t>
  214. <t t-if='type == "partner_type"'>
  215. <div class="act_as_cell first_column"
  216. style="width: 36.34%;"/>
  217. <div class="act_as_cell right"
  218. style="width: 28.66%;">Partner ending balance</div>
  219. </t>
  220. <!--## date_due-->
  221. <div class="act_as_cell" style="width: 6.47%;"/>
  222. <!--## amount_total_due-->
  223. <div class="act_as_cell amount" style="width: 6.57%;"/>
  224. <!--## amount_currency-->
  225. <div class="act_as_cell amount" style="width: 6.57%;">
  226. <span t-field="account_or_partner_object.final_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  227. </div>
  228. <!--## amount_total_due_currency + amount_residual_currency -->
  229. <t t-if="foreign_currency">
  230. <t t-if="account_or_partner_object.currency_id.id">
  231. <!--## currency_name-->
  232. <div class="act_as_cell amount" style="width: 2.25%;">
  233. <span t-field="account_or_partner_object.currency_id.display_name"/>
  234. </div>
  235. <!--## amount_total_due_currency-->
  236. <div class="act_as_cell amount" style="width: 6.57%;">
  237. <span t-field="account_or_partner_object.final_amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  238. </div>
  239. <!--## amount_residual_currency-->
  240. <div class="act_as_cell amount" style="width: 6.57%;">
  241. <span t-field="account_or_partner_object.final_amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  242. </div>
  243. </t>
  244. <t t-if="not account_or_partner_object.currency_id.id">
  245. <!--## currency_name-->
  246. <div class="act_as_cell"/>
  247. <!--## amount_total_due_currency-->
  248. <div class="act_as_cell"/>
  249. <!--## amount_residual_currency-->
  250. <div class="act_as_cell"/>
  251. </t>
  252. </t>
  253. </div>
  254. </div>
  255. </template>
  256. </odoo>