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.

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