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.

271 lines
13 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="account_financial_report.report_open_items_qweb">
  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="o.foreign_currency"/>
  15. <!-- Defines global variables used by internal layout -->
  16. <t t-set="title">Open Items - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
  17. <t t-set="company_name" t-value="o.company_id.name"/>
  18. <div class="page">
  19. <div class="row">
  20. <h4 class="mt0" t-esc="title or 'Odoo Report'" style="text-align: center;"/>
  21. </div>
  22. <!-- Display filters -->
  23. <t t-call="account_financial_report.report_open_items_filters"/>
  24. <t t-foreach="o.account_ids" t-as="account">
  25. <div class="page_break">
  26. <!-- Display account header -->
  27. <div class="act_as_table list_table" style="margin-top: 10px;" />
  28. <div class="account_title"
  29. style="width: 100%;">
  30. <span t-field="account.code"/>
  31. -
  32. <span t-field="account.name"/>
  33. </div>
  34. <!-- Display account partners -->
  35. <t t-foreach="account.partner_ids" t-as="partner">
  36. <div class="page_break">
  37. <!-- Display partner header -->
  38. <div class="account_title">
  39. <span t-field="partner.name"/>
  40. </div>
  41. <!-- Display partner move lines -->
  42. <t t-call="account_financial_report.report_open_items_lines"/>
  43. <!-- Display partner footer -->
  44. <t t-call="account_financial_report.report_open_items_ending_cumul">
  45. <t t-set="account_or_partner_object" t-value="partner"/>
  46. <t t-set="type" t-value='"partner_type"'/>
  47. </t>
  48. </div>
  49. </t>
  50. <!-- Display account footer -->
  51. <t t-call="account_financial_report.report_open_items_ending_cumul">
  52. <t t-set="account_or_partner_object" t-value="account"/>
  53. <t t-set="type" t-value='"account_type"'/>
  54. </t>
  55. </div>
  56. </t>
  57. </div>
  58. </template>
  59. <template id="account_financial_report.report_open_items_filters">
  60. <div class="act_as_table data_table" style="width: 100%;">
  61. <div class="act_as_row labels">
  62. <div class="act_as_cell">Date at filter</div>
  63. <div class="act_as_cell">Target moves filter</div>
  64. <div class="act_as_cell">Account balance at 0 filter</div>
  65. </div>
  66. <div class="act_as_row">
  67. <div class="act_as_cell">
  68. <span t-field="o.date_at"/>
  69. </div>
  70. <div class="act_as_cell">
  71. <t t-if="o.only_posted_moves">All posted entries</t>
  72. <t t-if="not o.only_posted_moves">All entries</t>
  73. </div>
  74. <div class="act_as_cell">
  75. <t t-if="o.hide_account_at_0">Hide</t>
  76. <t t-if="not o.hide_account_at_0">Show</t>
  77. </div>
  78. </div>
  79. </div>
  80. </template>
  81. <template id="account_financial_report.report_open_items_lines">
  82. <div class="act_as_table data_table" style="width: 100%;">
  83. <!-- Display table headers for lines -->
  84. <div class="act_as_thead">
  85. <div class="act_as_row labels">
  86. <!--## date-->
  87. <div class="act_as_cell first_column" style="width: 5.51%;">
  88. Date</div>
  89. <!--## move-->
  90. <div class="act_as_cell" style="width: 9.76%;">Entry</div>
  91. <!--## journal-->
  92. <div class="act_as_cell" style="width: 4.78%;">Journal</div>
  93. <!--## account code-->
  94. <div class="act_as_cell" style="width: 5.38%;">Account</div>
  95. <!--## partner-->
  96. <div class="act_as_cell" style="width: 15.07%;">Partner
  97. </div>
  98. <!--## ref - label-->
  99. <div class="act_as_cell" style="width: 24.5%;">Ref -
  100. Label</div>
  101. <!--## date_due-->
  102. <div class="act_as_cell" style="width: 6.47%;">Due
  103. date</div>
  104. <!--## amount_total_due-->
  105. <div class="act_as_cell" style="width: 6.57%;">Original
  106. </div>
  107. <!--## amount_residual-->
  108. <div class="act_as_cell" style="width: 6.57%;">Residual</div>
  109. <t t-if="foreign_currency">
  110. <!--## currency_name-->
  111. <div class="act_as_cell" style="width: 2.25%;">Cur.</div>
  112. <!--## amount_total_due_currency-->
  113. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
  114. <!--## amount_residual_currency-->
  115. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Residual</div>
  116. </t>
  117. </div>
  118. </div>
  119. <!-- Display each lines -->
  120. <t t-foreach="partner.move_line_ids" t-as="line">
  121. <!-- # lines or centralized lines -->
  122. <div class="act_as_row lines">
  123. <!--## date-->
  124. <div class="act_as_cell left">
  125. <span t-field="line.date"/>
  126. </div>
  127. <!--## move-->
  128. <div class="act_as_cell left">
  129. <t t-set="res_model" t-value="'account.move'"/>
  130. <span>
  131. <a t-att-data-active-id="line.move_line_id.move_id.id"
  132. t-att-data-res-model="res_model"
  133. class="o_account_financial_reports_web_action"
  134. style="color: black;">
  135. <t t-raw="line.entry"/>
  136. </a>
  137. </span>
  138. </div>
  139. <!--## journal-->
  140. <div class="act_as_cell left">
  141. <span t-field="line.journal"/>
  142. </div>
  143. <!--## account code-->
  144. <div class="act_as_cell left">
  145. <span t-field="line.account"/>
  146. </div>
  147. <!--## partner-->
  148. <div class="act_as_cell left">
  149. <t t-set="res_model" t-value="'res.partner'"/>
  150. <span t-if="line.partner">
  151. <a t-att-data-active-id="line.move_line_id.partner_id.id"
  152. t-att-data-res-model="res_model"
  153. class="o_account_financial_reports_web_action"
  154. style="color: black;">
  155. <t t-raw="line.partner"/>
  156. </a>
  157. </span>
  158. </div>
  159. <!--## ref - label-->
  160. <div class="act_as_cell left">
  161. <span t-field="line.label"/>
  162. </div>
  163. <!--## date_due-->
  164. <div class="act_as_cell left">
  165. <span t-field="line.date_due"/>
  166. </div>
  167. <!--## amount_total_due-->
  168. <div class="act_as_cell amount">
  169. <span t-field="line.amount_total_due" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  170. </div>
  171. <!--## amount_residual-->
  172. <div class="act_as_cell amount">
  173. <span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  174. </div>
  175. <t t-if="foreign_currency">
  176. <t t-if="line.currency_id.id">
  177. <!--## currency_name-->
  178. <div class="act_as_cell amount">
  179. <span t-field="line.currency_id.display_name"/>
  180. </div>
  181. <!--## amount_total_due_currency-->
  182. <div class="act_as_cell amount">
  183. <span t-field="line.amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  184. </div>
  185. <!--## amount_residual_currency-->
  186. <div class="act_as_cell amount">
  187. <span t-field="line.amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  188. </div>
  189. </t>
  190. <t t-if="not line.currency_id.id">
  191. <!--## currency_name-->
  192. <div class="act_as_cell"/>
  193. <!--## amount_total_due_currency-->
  194. <div class="act_as_cell"/>
  195. <!--## amount_residual_currency-->
  196. <div class="act_as_cell"/>
  197. </t>
  198. </t>
  199. </div>
  200. </t>
  201. </div>
  202. </template>
  203. <template id="account_financial_report.report_open_items_ending_cumul">
  204. <!-- Display ending balance line for account or partner -->
  205. <div class="act_as_table list_table" style="width: 100%;">
  206. <div class="act_as_row labels" style="font-weight: bold;">
  207. <!--## date-->
  208. <t t-if='type == "account_type"'>
  209. <div class="act_as_cell first_column" style="width: 36.34%;">
  210. <span t-field="account_or_partner_object.code"/>
  211. -
  212. <span t-field="account_or_partner_object.name"/>
  213. </div>
  214. <div class="act_as_cell right" style="width: 28.66%;">Ending
  215. balance</div>
  216. </t>
  217. <t t-if='type == "partner_type"'>
  218. <div class="act_as_cell first_column"
  219. style="width: 36.34%;"/>
  220. <div class="act_as_cell right"
  221. style="width: 28.66%;">Partner ending balance</div>
  222. </t>
  223. <!--## date_due-->
  224. <div class="act_as_cell" style="width: 6.47%;"/>
  225. <!--## amount_total_due-->
  226. <div class="act_as_cell amount" style="width: 6.57%;"/>
  227. <!--## amount_currency-->
  228. <div class="act_as_cell amount" style="width: 6.57%;">
  229. <span t-field="account_or_partner_object.final_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  230. </div>
  231. <!--## amount_total_due_currency + amount_residual_currency -->
  232. <t t-if="foreign_currency">
  233. <t t-if="account_or_partner_object.currency_id.id">
  234. <!--## currency_name-->
  235. <div class="act_as_cell amount" style="width: 2.25%;">
  236. <span t-field="account_or_partner_object.currency_id.display_name"/>
  237. </div>
  238. <!--## amount_total_due_currency-->
  239. <div class="act_as_cell amount" style="width: 6.57%;">
  240. <span t-field="account_or_partner_object.final_amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  241. </div>
  242. <!--## amount_residual_currency-->
  243. <div class="act_as_cell amount" style="width: 6.57%;">
  244. <span t-field="account_or_partner_object.final_amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  245. </div>
  246. </t>
  247. <t t-if="not account_or_partner_object.currency_id.id">
  248. <!--## currency_name-->
  249. <div class="act_as_cell"/>
  250. <!--## amount_total_due_currency-->
  251. <div class="act_as_cell"/>
  252. <!--## amount_residual_currency-->
  253. <div class="act_as_cell"/>
  254. </t>
  255. </t>
  256. </div>
  257. </div>
  258. </template>
  259. </odoo>