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.

301 lines
14 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
  17. t-raw="currency_name"
  18. /></t>
  19. <t t-set="company_name" t-value="Company_Name" />
  20. <div class="page">
  21. <div class="row">
  22. <h4
  23. class="mt0"
  24. t-esc="title or 'Odoo Report'"
  25. style="text-align: center;"
  26. />
  27. </div>
  28. <!-- Display filters -->
  29. <t t-call="account_financial_report.report_open_items_filters" />
  30. <t t-foreach="Open_Items.keys()" t-as="account_id">
  31. <!-- Display account header -->
  32. <div class="act_as_table list_table" style="margin-top: 10px;" />
  33. <div class="account_title" style="width: 100%;">
  34. <span t-esc="accounts_data[account_id]['code']" />
  35. -
  36. <span t-esc="accounts_data[account_id]['name']" />
  37. </div>
  38. <t t-if="not show_partner_details">
  39. <div class="act_as_table data_table" style="width: 100%;">
  40. <t
  41. t-call="account_financial_report.report_open_items_lines_header"
  42. />
  43. <!-- Display account move lines -->
  44. <t t-foreach="Open_Items[account_id]" t-as="line">
  45. <t
  46. t-call="account_financial_report.report_open_items_lines"
  47. />
  48. </t>
  49. </div>
  50. </t>
  51. <t t-if="show_partner_details">
  52. <div class="page_break">
  53. <!-- Display account partners -->
  54. <t t-foreach="Open_Items[account_id]" t-as="partner_id">
  55. <div class="act_as_caption account_title">
  56. <span t-esc="partners_data[partner_id]['name']" />
  57. </div>
  58. <div class="act_as_table data_table" style="width: 100%;">
  59. <!-- Display partner header -->
  60. <t
  61. t-call="account_financial_report.report_open_items_lines_header"
  62. />
  63. <!-- Display partner move lines -->
  64. <t
  65. t-foreach="Open_Items[account_id][partner_id]"
  66. t-as="line"
  67. >
  68. <t
  69. t-call="account_financial_report.report_open_items_lines"
  70. />
  71. </t>
  72. </div>
  73. <t
  74. t-call="account_financial_report.report_open_items_ending_cumul"
  75. >
  76. <t
  77. t-set="account_or_partner_id"
  78. t-value="partners_data[partner_id]"
  79. />
  80. <t
  81. t-set="currency_id"
  82. t-value="accounts_data[account_id]['currency_name']"
  83. />
  84. <t t-set="type" t-value='"partner_type"' />
  85. </t>
  86. </t>
  87. </div>
  88. </t>
  89. <!-- Display account footer -->
  90. <t t-call="account_financial_report.report_open_items_ending_cumul">
  91. <t
  92. t-set="account_or_partner_id"
  93. t-value="accounts_data[account_id]"
  94. />
  95. <t
  96. t-set="currency_id"
  97. t-value="accounts_data[account_id]['currency_name']"
  98. />
  99. <t t-set="type" t-value='"account_type"' />
  100. </t>
  101. </t>
  102. </div>
  103. </template>
  104. <template id="account_financial_report.report_open_items_filters">
  105. <div class="act_as_table data_table" style="width: 100%;">
  106. <div class="act_as_row labels">
  107. <div class="act_as_cell">Date at filter</div>
  108. <div class="act_as_cell">Target moves filter</div>
  109. <div class="act_as_cell">Account balance at 0 filter</div>
  110. </div>
  111. <div class="act_as_row">
  112. <div class="act_as_cell">
  113. <span t-esc="date_at" />
  114. </div>
  115. <div class="act_as_cell">
  116. <t t-if="target_move == 'posted'">All posted entries</t>
  117. <t t-if="target_move == 'all'">All entries</t>
  118. </div>
  119. <div class="act_as_cell">
  120. <t t-if="hide_account_at_0">Hide</t>
  121. <t t-if="not hide_account_at_0">Show</t>
  122. </div>
  123. </div>
  124. </div>
  125. </template>
  126. <template id="account_financial_report.report_open_items_lines_header">
  127. <!-- Display table headers for lines -->
  128. <div class="act_as_thead">
  129. <div class="act_as_row labels">
  130. <!--## date-->
  131. <div class="act_as_cell first_column" style="width: 5.51%;">
  132. Date</div>
  133. <!--## move-->
  134. <div class="act_as_cell" style="width: 9.76%;">Entry</div>
  135. <!--## journal-->
  136. <div class="act_as_cell" style="width: 4.78%;">Journal</div>
  137. <!--## account code-->
  138. <div class="act_as_cell" style="width: 5.38%;">Account</div>
  139. <!--## partner-->
  140. <div class="act_as_cell" style="width: 15.07%;">Partner
  141. </div>
  142. <!--## ref - label-->
  143. <div class="act_as_cell" style="width: 24.5%;">Ref -
  144. Label</div>
  145. <!--## date_due-->
  146. <div class="act_as_cell" style="width: 6.47%;">Due
  147. date</div>
  148. <!--## amount_total_due-->
  149. <div class="act_as_cell" style="width: 6.57%;">Original
  150. </div>
  151. <!--## amount_residual-->
  152. <div class="act_as_cell" style="width: 6.57%;">Residual</div>
  153. <t t-if="foreign_currency">
  154. <!--## currency_name-->
  155. <div class="act_as_cell" style="width: 2.25%;">Cur.</div>
  156. <!--## amount_total_due_currency-->
  157. <div
  158. class="act_as_cell amount"
  159. style="width: 6.57%;"
  160. >Cur. Original</div>
  161. <!--## amount_residual_currency-->
  162. <div
  163. class="act_as_cell amount"
  164. style="width: 6.57%;"
  165. >Cur. Residual</div>
  166. </t>
  167. </div>
  168. </div>
  169. </template>
  170. <template id="account_financial_report.report_open_items_lines">
  171. <!-- # lines or centralized lines -->
  172. <div class="act_as_row lines">
  173. <!--## date-->
  174. <div class="act_as_cell left">
  175. <span t-raw="line['date'].strftime('%d/%m/%Y')" />
  176. </div>
  177. <!--## move-->
  178. <div class="act_as_cell left">
  179. <span
  180. t-att-res-id="line['move_id']"
  181. res-model="account.move"
  182. view-type="form"
  183. >
  184. <t t-esc="line['move_name']" />
  185. </span>
  186. </div>
  187. <!--## journal-->
  188. <div class="act_as_cell left">
  189. <span t-esc="journals_data[line['journal_id']]['code']" />
  190. </div>
  191. <!--## account code-->
  192. <div class="act_as_cell left">
  193. <span t-esc="accounts_data[account_id]['code']" />
  194. </div>
  195. <!--## partner-->
  196. <div class="act_as_cell left">
  197. <!-- <span t-if="line.get('partner_id', False)" t-esc="line['partner_id']"/>-->
  198. <span t-esc="line['partner_name']" />
  199. </div>
  200. <!--## ref - label-->
  201. <div class="act_as_cell left">
  202. <span t-esc="line['ref_label']" />
  203. </div>
  204. <!--## date_due-->
  205. <div class="act_as_cell left">
  206. <span t-esc="line['date_maturity']" />
  207. </div>
  208. <!--## amount_total_due-->
  209. <div class="act_as_cell amount">
  210. <span
  211. t-if="line.get('original', False)"
  212. t-esc="line['original']"
  213. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  214. />
  215. </div>
  216. <!--## amount_residual-->
  217. <div class="act_as_cell amount">
  218. <span
  219. t-esc="line['amount_residual']"
  220. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  221. />
  222. </div>
  223. <t t-if="foreign_currency">
  224. <t t-if="line['currency_id']">
  225. <!--## currency_name-->
  226. <div class="act_as_cell amount">
  227. <span t-esc="line['currency_name']" />
  228. </div>
  229. <!--## amount_total_due_currency-->
  230. <div class="act_as_cell amount">
  231. <span t-esc="line['amount_currency']" />
  232. </div>
  233. <!--## amount_residual_currency-->
  234. <div class="act_as_cell amount">
  235. <span t-esc="line['amount_residual_currency']" />
  236. </div>
  237. </t>
  238. <t t-if="not line['currency_id']">
  239. <!--## currency_name-->
  240. <div class="act_as_cell" />
  241. <!--## amount_total_due_currency-->
  242. <div class="act_as_cell" />
  243. <!--## amount_residual_currency-->
  244. <div class="act_as_cell" />
  245. </t>
  246. </t>
  247. </div>
  248. </template>
  249. <template id="account_financial_report.report_open_items_ending_cumul">
  250. <!-- Display ending balance line for account or partner -->
  251. <div class="act_as_table list_table" style="width: 100%;">
  252. <div class="act_as_row labels" style="font-weight: bold;">
  253. <!--## date-->
  254. <t t-if='type == "account_type"'>
  255. <div class="act_as_cell first_column" style="width: 36.34%;">
  256. <span t-esc="accounts_data[account_id]['code']" />
  257. -
  258. <span t-esc="accounts_data[account_id]['name']" />
  259. </div>
  260. <div class="act_as_cell right" style="width: 28.66%;">Ending
  261. balance</div>
  262. </t>
  263. <t t-if='type == "partner_type"'>
  264. <div class="act_as_cell first_column" style="width: 36.34%;" />
  265. <div
  266. class="act_as_cell right"
  267. style="width: 28.66%;"
  268. >Partner ending balance</div>
  269. </t>
  270. <!--## date_due-->
  271. <div class="act_as_cell" style="width: 6.47%;" />
  272. <!--## amount_total_due-->
  273. <div class="act_as_cell amount" style="width: 6.57%;" />
  274. <!--## amount_currency-->
  275. <div class="act_as_cell amount" style="width: 6.57%;">
  276. <t t-if='type == "account_type"'>
  277. <span
  278. t-esc="total_amount[account_id]['residual']"
  279. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  280. />
  281. </t>
  282. <t t-if='type == "partner_type"'>
  283. <span
  284. t-esc="total_amount[account_id][partner_id]['residual']"
  285. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  286. />
  287. </t>
  288. </div>
  289. <!--## amount_total_due_currency + amount_residual_currency -->
  290. <t t-if="foreign_currency">
  291. <!--## currency_name-->
  292. <div class="act_as_cell" />
  293. <!--## amount_total_due_currency-->
  294. <div class="act_as_cell" />
  295. <!--## amount_residual_currency-->
  296. <div class="act_as_cell" />
  297. </t>
  298. </div>
  299. </div>
  300. </template>
  301. </odoo>