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.

263 lines
13 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 t-if="o.user_id" class="act_as_cell">Agent</div>
  61. <div class="act_as_cell">Date at filter</div>
  62. <div class="act_as_cell">Target moves filter</div>
  63. <div class="act_as_cell">Account balance at 0 filter</div>
  64. </div>
  65. <div class="act_as_row">
  66. <div t-if="o.user_id" class="act_as_cell">
  67. <span t-field="o.user_id"/>
  68. </div>
  69. <div class="act_as_cell">
  70. <span t-field="o.date_at"/>
  71. </div>
  72. <div class="act_as_cell">
  73. <t t-if="o.only_posted_moves">All posted entries</t>
  74. <t t-if="not o.only_posted_moves">All entries</t>
  75. </div>
  76. <div class="act_as_cell">
  77. <t t-if="o.hide_account_at_0">Hide</t>
  78. <t t-if="not o.hide_account_at_0">Show</t>
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <template id="account_financial_report_qweb.report_open_items_qweb_lines">
  84. <div class="act_as_table data_table" style="width: 100%;">
  85. <!-- Display table headers for lines -->
  86. <div class="act_as_thead">
  87. <div class="act_as_row labels">
  88. <!--## date-->
  89. <div class="act_as_cell first_column" style="width: 5.74%;">
  90. Date</div>
  91. <!--## move-->
  92. <div class="act_as_cell" style="width: 9.76%;">Entry</div>
  93. <!--## journal-->
  94. <div class="act_as_cell" style="width: 4.78%;">Journal</div>
  95. <!--## account code-->
  96. <div class="act_as_cell" style="width: 5.38%;">Account</div>
  97. <!--## partner-->
  98. <div class="act_as_cell" style="width: 14.57%;">Partner
  99. </div>
  100. <!--## ref - label-->
  101. <div class="act_as_cell" style="width: 25.5%;">Ref -
  102. Label</div>
  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. <!--## date_due-->
  158. <div class="act_as_cell left"><span t-field="line.date_due"/></div>
  159. <!--## amount_total_due-->
  160. <div class="act_as_cell amount">
  161. <span t-field="line.amount_total_due" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  162. </div>
  163. <!--## amount_residual-->
  164. <div class="act_as_cell amount">
  165. <span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  166. </div>
  167. <t t-if="foreign_currency">
  168. <t t-if="line.currency_id.id">
  169. <!--## currency_name-->
  170. <div class="act_as_cell amount">
  171. <span t-field="line.currency_id.display_name"/>
  172. </div>
  173. <!--## amount_total_due_currency-->
  174. <div class="act_as_cell amount">
  175. <span t-field="line.amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  176. </div>
  177. <!--## amount_residual_currency-->
  178. <div class="act_as_cell amount">
  179. <span t-field="line.amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  180. </div>
  181. </t>
  182. <t t-if="not line.currency_id.id">
  183. <!--## currency_name-->
  184. <div class="act_as_cell"/>
  185. <!--## amount_total_due_currency-->
  186. <div class="act_as_cell"/>
  187. <!--## amount_residual_currency-->
  188. <div class="act_as_cell"/>
  189. </t>
  190. </t>
  191. </div>
  192. </t>
  193. </div>
  194. </template>
  195. <template id="account_financial_report_qweb.report_open_items_qweb_ending_cumul">
  196. <!-- Display ending balance line for account or partner -->
  197. <div class="act_as_table list_table" style="width: 100%;">
  198. <div class="act_as_row labels" style="font-weight: bold;">
  199. <!--## date-->
  200. <t t-if='type == "account_type"'>
  201. <div class="act_as_cell first_column" style="width: 36.34%;">
  202. <span t-field="account_or_partner_object.code"/>
  203. -
  204. <span t-field="account_or_partner_object.name"/>
  205. </div>
  206. <div class="act_as_cell right" style="width: 28.66%;">Ending
  207. balance</div>
  208. </t>
  209. <t t-if='type == "partner_type"'>
  210. <div class="act_as_cell first_column"
  211. style="width: 36.34%;"/>
  212. <div class="act_as_cell right"
  213. style="width: 28.66%;">Partner ending balance</div>
  214. </t>
  215. <!--## date_due-->
  216. <div class="act_as_cell" style="width: 6.47%;"/>
  217. <!--## amount_total_due-->
  218. <div class="act_as_cell amount" style="width: 6.57%;"/>
  219. <!--## amount_currency-->
  220. <div class="act_as_cell amount" style="width: 6.57%;">
  221. <span t-field="account_or_partner_object.final_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  222. </div>
  223. <!--## amount_total_due_currency + amount_residual_currency -->
  224. <t t-if="foreign_currency">
  225. <t t-if="account_or_partner_object.currency_id.id">
  226. <!--## currency_name-->
  227. <div class="act_as_cell amount" style="width: 2.25%;">
  228. <span t-field="account_or_partner_object.currency_id.display_name"/>
  229. </div>
  230. <!--## amount_total_due_currency-->
  231. <div class="act_as_cell amount" style="width: 6.57%;">
  232. <span t-field="account_or_partner_object.final_amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  233. </div>
  234. <!--## amount_residual_currency-->
  235. <div class="act_as_cell amount" style="width: 6.57%;">
  236. <span t-field="account_or_partner_object.final_amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  237. </div>
  238. </t>
  239. <t t-if="not account_or_partner_object.currency_id.id">
  240. <!--## currency_name-->
  241. <div class="act_as_cell"/>
  242. <!--## amount_total_due_currency-->
  243. <div class="act_as_cell"/>
  244. <!--## amount_residual_currency-->
  245. <div class="act_as_cell"/>
  246. </t>
  247. </t>
  248. </div>
  249. </div>
  250. </template>
  251. </odoo>