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.

259 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 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. <!--## date_due-->
  100. <div class="act_as_cell" style="width: 5.74%;">Due
  101. date</div>
  102. <!--## amount_total_due-->
  103. <div class="act_as_cell" style="width: 6.57%;">Original
  104. </div>
  105. <!--## amount_residual-->
  106. <div class="act_as_cell" style="width: 6.57%;">Residual</div>
  107. <t t-if="foreign_currency">
  108. <!--## currency_name-->
  109. <div class="act_as_cell" style="width: 2.25%;">Cur.</div>
  110. <!--## amount_total_due_currency-->
  111. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
  112. <!--## amount_residual_currency-->
  113. <div class="act_as_cell amount" style="width: 6.57%;">Cur. Residual</div>
  114. </t>
  115. </div>
  116. </div>
  117. <!-- Display each lines -->
  118. <t t-foreach="partner.move_line_ids" t-as="line">
  119. <!-- # lines or centralized lines -->
  120. <div class="act_as_row lines">
  121. <!--## date-->
  122. <div class="act_as_cell left"><span t-field="line.date"/></div>
  123. <!--## move-->
  124. <div class="act_as_cell left">
  125. <t t-set="res_model" t-value="'account.move'"/>
  126. <span>
  127. <a t-att-data-active-id="line.move_line_id.move_id.id"
  128. t-att-data-res-model="res_model"
  129. class="o_account_financial_reports_web_action"
  130. t-att-style="style">
  131. <t t-att-style="style" t-raw="line.entry"/>
  132. </a>
  133. </span>
  134. </div>
  135. <!--## journal-->
  136. <div class="act_as_cell left"><span t-field="line.journal"/></div>
  137. <!--## account code-->
  138. <div class="act_as_cell left"><span t-field="line.account"/></div>
  139. <!--## partner-->
  140. <div class="act_as_cell left">
  141. <t t-set="res_model" t-value="'res.partner'"/>
  142. <span t-if="line.partner">
  143. <a t-att-data-active-id="line.move_line_id.partner_id.id"
  144. t-att-data-res-model="res_model"
  145. class="o_account_financial_reports_web_action"
  146. style="color: black;">
  147. <t t-raw="line.partner"/>
  148. </a>
  149. </span>
  150. </div>
  151. <!--## ref - label-->
  152. <div class="act_as_cell left"><span t-field="line.label"/></div>
  153. <!--## date_due-->
  154. <div class="act_as_cell left"><span t-field="line.date_due"/></div>
  155. <!--## amount_total_due-->
  156. <div class="act_as_cell amount">
  157. <span t-field="line.amount_total_due" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  158. </div>
  159. <!--## amount_residual-->
  160. <div class="act_as_cell amount">
  161. <span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  162. </div>
  163. <t t-if="foreign_currency">
  164. <t t-if="line.currency_id.id">
  165. <!--## currency_name-->
  166. <div class="act_as_cell amount">
  167. <span t-field="line.currency_id.display_name"/>
  168. </div>
  169. <!--## amount_total_due_currency-->
  170. <div class="act_as_cell amount">
  171. <span t-field="line.amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  172. </div>
  173. <!--## amount_residual_currency-->
  174. <div class="act_as_cell amount">
  175. <span t-field="line.amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
  176. </div>
  177. </t>
  178. <t t-if="not line.currency_id.id">
  179. <!--## currency_name-->
  180. <div class="act_as_cell"/>
  181. <!--## amount_total_due_currency-->
  182. <div class="act_as_cell"/>
  183. <!--## amount_residual_currency-->
  184. <div class="act_as_cell"/>
  185. </t>
  186. </t>
  187. </div>
  188. </t>
  189. </div>
  190. </template>
  191. <template id="account_financial_report_qweb.report_open_items_qweb_ending_cumul">
  192. <!-- Display ending balance line for account or partner -->
  193. <div class="act_as_table list_table" style="width: 100%;">
  194. <div class="act_as_row labels" style="font-weight: bold;">
  195. <!--## date-->
  196. <t t-if='type == "account_type"'>
  197. <div class="act_as_cell first_column" style="width: 36.34%;">
  198. <span t-field="account_or_partner_object.code"/>
  199. -
  200. <span t-field="account_or_partner_object.name"/>
  201. </div>
  202. <div class="act_as_cell right" style="width: 28.66%;">Ending
  203. balance</div>
  204. </t>
  205. <t t-if='type == "partner_type"'>
  206. <div class="act_as_cell first_column"
  207. style="width: 36.34%;"/>
  208. <div class="act_as_cell right"
  209. style="width: 28.66%;">Partner ending balance</div>
  210. </t>
  211. <!--## date_due-->
  212. <div class="act_as_cell" style="width: 6.47%;"/>
  213. <!--## amount_total_due-->
  214. <div class="act_as_cell amount" style="width: 6.57%;"/>
  215. <!--## amount_currency-->
  216. <div class="act_as_cell amount" style="width: 6.57%;">
  217. <span t-field="account_or_partner_object.final_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  218. </div>
  219. <!--## amount_total_due_currency + amount_residual_currency -->
  220. <t t-if="foreign_currency">
  221. <t t-if="account_or_partner_object.currency_id.id">
  222. <!--## currency_name-->
  223. <div class="act_as_cell amount" style="width: 2.25%;">
  224. <span t-field="account_or_partner_object.currency_id.display_name"/>
  225. </div>
  226. <!--## amount_total_due_currency-->
  227. <div class="act_as_cell amount" style="width: 6.57%;">
  228. <span t-field="account_or_partner_object.final_amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  229. </div>
  230. <!--## amount_residual_currency-->
  231. <div class="act_as_cell amount" style="width: 6.57%;">
  232. <span t-field="account_or_partner_object.final_amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.currency_id}"/>
  233. </div>
  234. </t>
  235. <t t-if="not account_or_partner_object.currency_id.id">
  236. <!--## currency_name-->
  237. <div class="act_as_cell"/>
  238. <!--## amount_total_due_currency-->
  239. <div class="act_as_cell"/>
  240. <!--## amount_residual_currency-->
  241. <div class="act_as_cell"/>
  242. </t>
  243. </t>
  244. </div>
  245. </div>
  246. </template>
  247. </odoo>