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.

319 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['entry_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
  190. t-att-res-id="journals_data[line['journal_id']]['id']"
  191. res-model="account.journal"
  192. view-type="form"
  193. >
  194. <t t-esc="journals_data[line['journal_id']]['code']" />
  195. </span>
  196. </div>
  197. <!--## account code-->
  198. <div class="act_as_cell left">
  199. <span
  200. t-att-res-id="accounts_data[account_id]['id']"
  201. res-model="account.account"
  202. view-type="form"
  203. >
  204. <t t-esc="accounts_data[account_id]['code']" />
  205. </span>
  206. </div>
  207. <!--## partner-->
  208. <div class="act_as_cell left">
  209. <span
  210. t-if="line.get('partner_id', False)"
  211. t-att-res-id="line['partner_id']"
  212. res-model="res.partner"
  213. view-type="form"
  214. >
  215. <t t-esc="line['partner_name']" />
  216. </span>
  217. </div>
  218. <!--## ref - label-->
  219. <div class="act_as_cell left">
  220. <span t-esc="line['ref_label']" />
  221. </div>
  222. <!--## date_due-->
  223. <div class="act_as_cell left">
  224. <span t-esc="line['date_maturity']" />
  225. </div>
  226. <!--## amount_total_due-->
  227. <div class="act_as_cell amount">
  228. <span
  229. t-if="line.get('original', False)"
  230. t-esc="line['original']"
  231. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  232. />
  233. </div>
  234. <!--## amount_residual-->
  235. <div class="act_as_cell amount">
  236. <span
  237. t-esc="line['amount_residual']"
  238. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  239. />
  240. </div>
  241. <t t-if="foreign_currency">
  242. <t t-if="line['currency_id']">
  243. <!--## currency_name-->
  244. <div class="act_as_cell amount">
  245. <span t-esc="line['currency_name']" />
  246. </div>
  247. <!--## amount_total_due_currency-->
  248. <div class="act_as_cell amount">
  249. <span t-esc="line['amount_currency']" />
  250. </div>
  251. <!--## amount_residual_currency-->
  252. <div class="act_as_cell amount">
  253. <span t-esc="line['amount_residual_currency']" />
  254. </div>
  255. </t>
  256. <t t-if="not line['currency_id']">
  257. <!--## currency_name-->
  258. <div class="act_as_cell" />
  259. <!--## amount_total_due_currency-->
  260. <div class="act_as_cell" />
  261. <!--## amount_residual_currency-->
  262. <div class="act_as_cell" />
  263. </t>
  264. </t>
  265. </div>
  266. </template>
  267. <template id="account_financial_report.report_open_items_ending_cumul">
  268. <!-- Display ending balance line for account or partner -->
  269. <div class="act_as_table list_table" style="width: 100%;">
  270. <div class="act_as_row labels" style="font-weight: bold;">
  271. <!--## date-->
  272. <t t-if='type == "account_type"'>
  273. <div class="act_as_cell first_column" style="width: 36.34%;">
  274. <span t-esc="accounts_data[account_id]['code']" />
  275. -
  276. <span t-esc="accounts_data[account_id]['name']" />
  277. </div>
  278. <div class="act_as_cell right" style="width: 28.66%;">Ending
  279. balance</div>
  280. </t>
  281. <t t-if='type == "partner_type"'>
  282. <div class="act_as_cell first_column" style="width: 36.34%;" />
  283. <div
  284. class="act_as_cell right"
  285. style="width: 28.66%;"
  286. >Partner ending balance</div>
  287. </t>
  288. <!--## date_due-->
  289. <div class="act_as_cell" style="width: 6.47%;" />
  290. <!--## amount_total_due-->
  291. <div class="act_as_cell amount" style="width: 6.57%;" />
  292. <!--## amount_currency-->
  293. <div class="act_as_cell amount" style="width: 6.57%;">
  294. <t t-if='type == "account_type"'>
  295. <span
  296. t-esc="total_amount[account_id]['residual']"
  297. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  298. />
  299. </t>
  300. <t t-if='type == "partner_type"'>
  301. <span
  302. t-esc="total_amount[account_id][partner_id]['residual']"
  303. t-options="{'widget': 'monetary', 'display_currency': company_currency}"
  304. />
  305. </t>
  306. </div>
  307. <!--## amount_total_due_currency + amount_residual_currency -->
  308. <t t-if="foreign_currency">
  309. <!--## currency_name-->
  310. <div class="act_as_cell" />
  311. <!--## amount_total_due_currency-->
  312. <div class="act_as_cell" />
  313. <!--## amount_residual_currency-->
  314. <div class="act_as_cell" />
  315. </t>
  316. </div>
  317. </div>
  318. </template>
  319. </odoo>