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.

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