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.

255 lines
12 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="open_items">
  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="foreign_currency"/>
  15. <!-- Defines global variables used by internal layout -->
  16. <t t-set="title">Open Items - <t t-raw="company_name"/> - <t t-raw="currency_name"/></t>
  17. <t t-set="company_name" t-value="Company_Name"/>
  18. <div class="page">
  19. <div class="row">
  20. <h4 class="mt0" t-esc="title or 'Odoo Report'" style="text-align: center;"/>
  21. </div>
  22. <!-- Display filters -->
  23. <t t-call="account_financial_report.report_open_items_filters"/>
  24. <t t-foreach="Open_Items.keys()" t-as="account_id">
  25. <div class="page_break">
  26. <!-- Display account header -->
  27. <div class="act_as_table list_table" style="margin-top: 10px;" />
  28. <div class="account_title"
  29. style="width: 100%;">
  30. <span t-esc="accounts_data[account_id]['code']"/>
  31. -
  32. <span t-esc="accounts_data[account_id]['name']"/>
  33. </div>
  34. <!-- Display account partners -->
  35. <t t-foreach="Open_Items[account_id]" t-as="partner_id" >
  36. <div class="page_break">
  37. <!-- Display partner header -->
  38. <div class="act_as_caption account_title">
  39. <span t-esc="partners_data[partner_id]['name']"/>
  40. </div>
  41. <!-- Display partner move lines -->
  42. <t t-call="account_financial_report.report_open_items_lines"/>
  43. <!-- Display partner footer -->
  44. <t t-call="account_financial_report.report_open_items_ending_cumul">
  45. <t t-set="account_or_partner_id" t-value="partners_data[partner_id]"/>
  46. <t t-set="currency_id" t-value="accounts_data[account_id]['currency_name']"/>
  47. <t t-set="type" t-value='"partner_type"'/>
  48. </t>
  49. </div>
  50. </t>
  51. <!-- Display account footer -->
  52. <t t-call="account_financial_report.report_open_items_ending_cumul">
  53. <t t-set="account_or_partner_id" t-value="accounts_data[account_id]"/>
  54. <t t-set="currency_id" t-value="accounts_data[account_id]['currency_name']"/>
  55. <t t-set="type" t-value='"account_type"'/>
  56. </t>
  57. </div>
  58. </t>
  59. </div>
  60. </template>
  61. <template id="account_financial_report.report_open_items_filters">
  62. <div class="act_as_table data_table" style="width: 100%;">
  63. <div class="act_as_row labels">
  64. <div class="act_as_cell">Date at filter</div>
  65. <div class="act_as_cell">Target moves filter</div>
  66. <div class="act_as_cell">Account balance at 0 filter</div>
  67. </div>
  68. <div class="act_as_row">
  69. <div class="act_as_cell">
  70. <span t-esc="date_at"/>
  71. </div>
  72. <div class="act_as_cell">
  73. <t t-if="target_move == 'posted'">All posted entries</t>
  74. <t t-if="target_move == 'all'">All entries</t>
  75. </div>
  76. <div class="act_as_cell">
  77. <t t-if="hide_account_at_0">Hide</t>
  78. <t t-if="not hide_account_at_0">Show</t>
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <template id="account_financial_report.report_open_items_lines">
  84. <div class="act_as_table data_table" style="width: 100%;">
  85. <!-- Display table headers for lines -->
  86. <div class="act_as_thead">
  87. <div class="act_as_row labels">
  88. <!--## date-->
  89. <div class="act_as_cell first_column" style="width: 5.51%;">
  90. Date</div>
  91. <!--## move-->
  92. <div class="act_as_cell" style="width: 9.76%;">Entry</div>
  93. <!--## journal-->
  94. <div class="act_as_cell" style="width: 4.78%;">Journal</div>
  95. <!--## account code-->
  96. <div class="act_as_cell" style="width: 5.38%;">Account</div>
  97. <!--## partner-->
  98. <div class="act_as_cell" style="width: 15.07%;">Partner
  99. </div>
  100. <!--## ref - label-->
  101. <div class="act_as_cell" style="width: 24.5%;">Ref -
  102. Label</div>
  103. <!--## date_due-->
  104. <div class="act_as_cell" style="width: 6.47%;">Due
  105. date</div>
  106. <!--## amount_total_due-->
  107. <div class="act_as_cell" style="width: 6.57%;">Original
  108. </div>
  109. <!--## amount_residual-->
  110. <div class="act_as_cell" style="width: 6.57%;">Residual</div>
  111. <t t-if="foreign_currency">
  112. <!--## currency_name-->
  113. <div class="act_as_cell" style="width: 2.25%;">Cur.</div>
  114. <!--## amount_total_due_currency-->
  115. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
  116. <!--## amount_residual_currency-->
  117. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Residual</div>
  118. </t>
  119. </div>
  120. </div>
  121. <!-- Display each lines -->
  122. <t t-foreach="Open_Items[account_id][partner_id]" t-as="line" >
  123. <!-- # lines or centralized lines -->
  124. <div class="act_as_row lines">
  125. <!--## date-->
  126. <div class="act_as_cell left">
  127. <span t-raw="line['date']"/>
  128. </div>
  129. <!--## move-->
  130. <div class="act_as_cell left">
  131. <t t-set="res_model" t-value="'account.move'"/>
  132. <span>
  133. <a t-att-data-active-id="line['move_id']"
  134. t-att-data-res-model="res_model"
  135. class="o_account_financial_reports_web_action"
  136. style="color: black;">
  137. <t t-esc="line['move_name']"/>
  138. </a>
  139. </span>
  140. </div>
  141. <!--## journal-->
  142. <div class="act_as_cell left">
  143. <span t-esc="line['journal']"/>
  144. </div>
  145. <!--## account code-->
  146. <div class="act_as_cell left">
  147. <span t-esc="line['account']"/>
  148. </div>
  149. <!--## partner-->
  150. <div class="act_as_cell left">
  151. <!-- <span t-if="line.get('partner_id', False)" t-esc="line['partner_id']"/>-->
  152. <span t-esc="line['partner_name']"/>
  153. </div>
  154. <!--## ref - label-->
  155. <div class="act_as_cell left">
  156. <span t-esc="line['ref']"/>
  157. </div>
  158. <!--## date_due-->
  159. <div class="act_as_cell left">
  160. <span t-esc="line['date_maturity']"/>
  161. </div>
  162. <!--## amount_total_due-->
  163. <div class="act_as_cell amount">
  164. <span t-if="line.get('original', False)" t-esc="line['original']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  165. </div>
  166. <!--## amount_residual-->
  167. <div class="act_as_cell amount">
  168. <span t-esc="line['amount_residual']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  169. </div>
  170. <t t-if="foreign_currency">
  171. <t t-if="line['currency_id']">
  172. <!--## currency_name-->
  173. <div class="act_as_cell amount">
  174. <span t-esc="line['currency_name']"/>
  175. </div>
  176. <!--## amount_total_due_currency-->
  177. <div class="act_as_cell amount">
  178. <span t-esc="line['amount_currency']"/>
  179. </div>
  180. <!--## amount_residual_currency-->
  181. <div class="act_as_cell amount">
  182. <span t-esc="line['amount_residual_currency']"/>
  183. </div>
  184. </t>
  185. <t t-if="not line['currency_id']">
  186. <!--## currency_name-->
  187. <div class="act_as_cell"/>
  188. <!--## amount_total_due_currency-->
  189. <div class="act_as_cell"/>
  190. <!--## amount_residual_currency-->
  191. <div class="act_as_cell"/>
  192. </t>
  193. </t>
  194. </div>
  195. </t>
  196. </div>
  197. </template>
  198. <template id="account_financial_report.report_open_items_ending_cumul">
  199. <!-- Display ending balance line for account or partner -->
  200. <div class="act_as_table list_table" style="width: 100%;">
  201. <div class="act_as_row labels" style="font-weight: bold;">
  202. <!--## date-->
  203. <t t-if='type == "account_type"'>
  204. <div class="act_as_cell first_column" style="width: 36.34%;">
  205. <span t-esc="accounts_data[account_id]['code']"/>
  206. -
  207. <span t-esc="accounts_data[account_id]['name']"/>
  208. </div>
  209. <div class="act_as_cell right" style="width: 28.66%;">Ending
  210. balance</div>
  211. </t>
  212. <t t-if='type == "partner_type"'>
  213. <div class="act_as_cell first_column"
  214. style="width: 36.34%;"/>
  215. <div class="act_as_cell right"
  216. style="width: 28.66%;">Partner ending balance</div>
  217. </t>
  218. <!--## date_due-->
  219. <div class="act_as_cell" style="width: 6.47%;"/>
  220. <!--## amount_total_due-->
  221. <div class="act_as_cell amount" style="width: 6.57%;"/>
  222. <!--## amount_currency-->
  223. <div class="act_as_cell amount" style="width: 6.57%;">
  224. <t t-if='type == "account_type"'>
  225. <span t-esc="total_amount[account_id]['residual']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  226. </t>
  227. <t t-if='type == "partner_type"'>
  228. <span t-esc="total_amount[account_id][partner_id]['residual']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  229. </t>
  230. </div>
  231. <!--## amount_total_due_currency + amount_residual_currency -->
  232. <t t-if="foreign_currency">
  233. <!--## currency_name-->
  234. <div class="act_as_cell"/>
  235. <!--## amount_total_due_currency-->
  236. <div class="act_as_cell"/>
  237. <!--## amount_residual_currency-->
  238. <div class="act_as_cell"/>
  239. </t>
  240. </div>
  241. </div>
  242. </template>
  243. </odoo>