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.

273 lines
14 KiB

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