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.

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