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.

249 lines
13 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="account_financial_report_qweb.report_general_ledger_qweb">
  4. <t t-call="report.html_container">
  5. <t t-foreach="docs" t-as="o">
  6. <!-- Saved flag fields into variables, used to define columns display -->
  7. <t t-set="show_cost_center" t-value="o.show_cost_center"/>
  8. <t t-set="has_second_currency" t-value="o.has_second_currency"/>
  9. <t t-call="account_financial_report_qweb.internal_layout">
  10. <!-- Defines global variables used by internal layout -->
  11. <t t-set="title">General Ledger</t>
  12. <t t-set="company_name" t-value="o.company_id.name"/>
  13. <div class="page">
  14. <!-- Display filters -->
  15. <t t-call="account_financial_report_qweb.report_general_ledger_qweb_filters"/>
  16. <t t-foreach="o.account_ids" t-as="account">
  17. <div class="page_break">
  18. <!-- Display account header -->
  19. <div class="act_as_table list_table" style="margin-top: 10px;"/>
  20. <div class="act_as_caption account_title" style="width: 1141px !important;">
  21. <span t-field="account.code"/> - <span t-field="account.name"/>
  22. </div>
  23. <t t-if="not account.partner_ids">
  24. <!-- Display account move lines without partner regroup -->
  25. <t t-call="account_financial_report_qweb.report_general_ledger_qweb_lines">
  26. <t t-set="account_or_partner_object" t-value="account"/>
  27. </t>
  28. </t>
  29. <t t-if="account.partner_ids">
  30. <!-- Display account partners -->
  31. <t t-foreach="account.partner_ids" t-as="partner">
  32. <div class="page_break">
  33. <!-- Display partner header -->
  34. <div class="act_as_caption account_title">
  35. <span t-field="partner.name"/>
  36. </div>
  37. <!-- Display partner move lines -->
  38. <t t-call="account_financial_report_qweb.report_general_ledger_qweb_lines">
  39. <t t-set="account_or_partner_object" t-value="partner"/>
  40. </t>
  41. <!-- Display partner footer -->
  42. <t t-call="account_financial_report_qweb.report_general_ledger_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. </t>
  49. <!-- Display account footer -->
  50. <t t-call="account_financial_report_qweb.report_general_ledger_qweb_ending_cumul">
  51. <t t-set="account_or_partner_object" t-value="account"/>
  52. <t t-set="type" t-value='"account_type"'/>
  53. </t>
  54. </div>
  55. </t>
  56. </div>
  57. </t>
  58. </t>
  59. </t>
  60. </template>
  61. <template id="account_financial_report_qweb.report_general_ledger_qweb_filters">
  62. <div class="act_as_table data_table" style="width: 1140px !important;">
  63. <div class="act_as_row labels">
  64. <div class="act_as_cell">Date range filter</div>
  65. <div class="act_as_cell">Target moves filter</div>
  66. <div class="act_as_cell">Account balance at 0 filter</div>
  67. <div class="act_as_cell">Centralize filter</div>
  68. </div>
  69. <div class="act_as_row">
  70. <div class="act_as_cell">
  71. From: <span t-field="o.date_from"/> To: <span t-field="o.date_to"/>
  72. </div>
  73. <div class="act_as_cell">
  74. <t t-if="o.only_posted_moves">All posted entries</t>
  75. <t t-if="not o.only_posted_moves">All entries</t>
  76. </div>
  77. <div class="act_as_cell">
  78. <t t-if="o.hide_account_balance_at_0">Hide</t>
  79. <t t-if="not o.hide_account_balance_at_0">Show</t>
  80. </div>
  81. <div class="act_as_cell">
  82. <t t-if="o.centralize">Yes</t>
  83. <t t-if="not o.centralize">No</t>
  84. </div>
  85. </div>
  86. </div>
  87. </template>
  88. <template id="account_financial_report_qweb.report_general_ledger_qweb_lines">
  89. <div class="act_as_table data_table" style="width: 1140px !important;">
  90. <!-- Display table headers for lines -->
  91. <div class="act_as_thead">
  92. <div class="act_as_row labels">
  93. <!--## date-->
  94. <div class="act_as_cell first_column" style="width: 60px;">Date</div>
  95. <!--## move-->
  96. <div class="act_as_cell" style="width: 100px;">Entry</div>
  97. <!--## journal-->
  98. <div class="act_as_cell" style="width: 40px;">Journal</div>
  99. <!--## account code-->
  100. <div class="act_as_cell" style="width: 50px;">Account</div>
  101. <!--## partner-->
  102. <div class="act_as_cell" style="width: 140px;">Partner</div>
  103. <!--## ref - label-->
  104. <div class="act_as_cell" style="width: 290px;">Ref - Label</div>
  105. <t t-if="show_cost_center">
  106. <!--## cost_center-->
  107. <div class="act_as_cell" style="width: 100px;">Cost center</div>
  108. </t>
  109. <!--## matching_number-->
  110. <div class="act_as_cell" style="width: 25px;">Rec.</div>
  111. <!--## debit-->
  112. <div class="act_as_cell amount" style="width: 75px;">Debit</div>
  113. <!--## credit-->
  114. <div class="act_as_cell amount" style="width: 75px;">Credit</div>
  115. <!--## balance cumulated-->
  116. <div class="act_as_cell amount" style="width: 75px;">Cumul. Bal.</div>
  117. <t t-if="has_second_currency">
  118. <!--## currency_name-->
  119. <div class="act_as_cell" style="width: 35px;">Cur.</div>
  120. <!--## amount_currency-->
  121. <div class="act_as_cell amount" style="width: 75px;">Amount cur.</div>
  122. </t>
  123. </div>
  124. </div>
  125. <!-- Display first line with initial balance -->
  126. <div class="act_as_row lines">
  127. <!--## date-->
  128. <div class="act_as_cell"></div>
  129. <!--## move-->
  130. <div class="act_as_cell"></div>
  131. <!--## journal-->
  132. <div class="act_as_cell"></div>
  133. <!--## account code-->
  134. <div class="act_as_cell"></div>
  135. <!--## partner-->
  136. <div class="act_as_cell"></div>
  137. <!--## ref - label-->
  138. <div class="act_as_cell amount">Initial balance</div>
  139. <t t-if="show_cost_center">
  140. <!--## cost_center-->
  141. <div class="act_as_cell"></div>
  142. </t>
  143. <!--## matching_number-->
  144. <div class="act_as_cell"></div>
  145. <!--## debit-->
  146. <div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_debit"/></div>
  147. <!--## credit-->
  148. <div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_credit"/></div>
  149. <!--## balance cumulated-->
  150. <div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_balance"/></div>
  151. <t t-if="has_second_currency">
  152. <!--## currency_name-->
  153. <div class="act_as_cell"></div>
  154. <!--## amount_currency-->
  155. <div class="act_as_cell"></div>
  156. </t>
  157. </div>
  158. <!-- Display each lines -->
  159. <t t-foreach="account_or_partner_object.move_line_ids" t-as="line">
  160. <!-- # lines or centralized lines -->
  161. <div class="act_as_row lines">
  162. <!--## date-->
  163. <div class="act_as_cell left"><span t-field="line.date"/></div>
  164. <!--## move-->
  165. <div class="act_as_cell left"><span t-field="line.entry"/></div>
  166. <!--## journal-->
  167. <div class="act_as_cell left"><span t-field="line.journal"/></div>
  168. <!--## account code-->
  169. <div class="act_as_cell left"><span t-field="line.account"/></div>
  170. <!--## partner-->
  171. <div class="act_as_cell left"><span t-field="line.partner"/></div>
  172. <!--## ref - label-->
  173. <div class="act_as_cell left"><span t-field="line.label"/></div>
  174. <t t-if="show_cost_center">
  175. <!--## cost_center-->
  176. <div class="act_as_cell left"><span t-field="line.cost_center"/></div>
  177. </t>
  178. <!--## matching_number-->
  179. <div class="act_as_cell"><span t-field="line.matching_number"/></div>
  180. <!--## debit-->
  181. <div class="act_as_cell amount"><span t-field="line.debit"/></div>
  182. <!--## credit-->
  183. <div class="act_as_cell amount"><span t-field="line.credit"/></div>
  184. <!--## balance cumulated-->
  185. <div class="act_as_cell amount"><span t-field="line.cumul_balance"/></div>
  186. <t t-if="has_second_currency">
  187. <!--## currency_name-->
  188. <div class="act_as_cell"><span t-field="line.currency_name"/></div>
  189. <t t-if="line.currency_name">
  190. <!--## amount_currency-->
  191. <div class="act_as_cell amount"><span t-field="line.amount_currency"/></div>
  192. </t>
  193. <t t-if="not line.currency_name">
  194. <!--## amount_currency-->
  195. <div class="act_as_cell"></div>
  196. </t>
  197. </t>
  198. </div>
  199. </t>
  200. </div>
  201. </template>
  202. <template id="account_financial_report_qweb.report_general_ledger_qweb_ending_cumul">
  203. <!-- Display ending balance line for account or partner -->
  204. <div class="act_as_table list_table" style="width: 1141px !important;">
  205. <div class="act_as_row labels" style="font-weight: bold;">
  206. <!--## date-->
  207. <t t-if='type == "account_type"'>
  208. <div class="act_as_cell first_column" style="width: 380px;"><span t-field="account_or_partner_object.code"/> - <span t-field="account_or_partner_object.name"/></div>
  209. <div class="act_as_cell right" style="width: 290px;">Ending balance</div>
  210. </t>
  211. <t t-if='type == "partner_type"'>
  212. <div class="act_as_cell first_column" style="width: 380px;"></div>
  213. <div class="act_as_cell right" style="width: 290px;">Partner ending balance</div>
  214. </t>
  215. <t t-if="show_cost_center">
  216. <!--## cost_center-->
  217. <div class="act_as_cell" style="width: 100px;"></div>
  218. </t>
  219. <!--## matching_number-->
  220. <div class="act_as_cell" style="width: 25px;"></div>
  221. <!--## debit-->
  222. <div class="act_as_cell amount" style="width: 75px;"><span t-field="account_or_partner_object.final_debit"/></div>
  223. <!--## credit-->
  224. <div class="act_as_cell amount" style="width: 75px;"><span t-field="account_or_partner_object.final_credit"/></div>
  225. <!--## balance cumulated-->
  226. <div class="act_as_cell amount" style="width: 75px; padding-right: 1px;"><span t-field="account_or_partner_object.final_balance"/></div>
  227. <t t-if="has_second_currency">
  228. <!--## currency_name + amount_currency-->
  229. <div class="act_as_cell" style="width: 110px;"></div>
  230. </t>
  231. </div>
  232. </div>
  233. </template>
  234. </odoo>