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.

293 lines
15 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="assets_specific" inherit_id="report.assets_common">
  4. <xpath expr="." position="inside">
  5. <link href="/account_financial_report_qweb/static/src/css/report.css" rel="stylesheet"/>
  6. </xpath>
  7. </template>
  8. <template id="account.report_generalledger_qweb">
  9. <t t-call="report.html_container">
  10. <t t-set="data_report_margin_top" t-value="12"/>
  11. <t t-set="data_report_header_spacing" t-value="9"/>
  12. <t t-set="data_report_dpi" t-value="110"/>
  13. <t t-foreach="docs" t-as="o">
  14. <t t-call="report.internal_layout">
  15. <div class="page">
  16. <div class="act_as_table data_table" style="width: 1205px">
  17. <div class="act_as_row labels">
  18. <!--<div class="act_as_cell">Chart of Account</div>-->
  19. <div class="act_as_cell">Fiscal Year</div>
  20. <t t-if="o.fiscalyear or o.start_date or o.end_date">
  21. <div class="act_as_cell">
  22. <t t-if="not o.fiscalyear">
  23. Dates Filter
  24. </t>
  25. <t t-if="o.fiscalyear">
  26. Fiscal Year Filter
  27. </t>
  28. </div>
  29. </t>
  30. <div class="act_as_cell">Accounts Filter</div>
  31. <div class="act_as_cell">Journal Filter</div>
  32. <div class="act_as_cell">Target Moves</div>
  33. </div>
  34. <div class="act_as_row">
  35. <div class="act_as_cell"><span t-field="o.fiscalyear.name"/></div>
  36. <t t-if="o.fiscalyear or o.start_date or o.end_date">
  37. <div class="act_as_cell">
  38. From:
  39. <span t-field="o.start_date"/>
  40. To:
  41. <span t-field="o.end_date"/>
  42. </div>
  43. </t>
  44. <div class="act_as_cell">
  45. <t t-if="o.account_ids">
  46. <t t-raw="', '.join(o.account_ids.mapped('code'))"/>
  47. </t>
  48. <t t-if="not o.account_ids">
  49. All
  50. </t>
  51. </div>
  52. <div class="act_as_cell">
  53. <t t-if="o.journal_ids">
  54. <t t-raw="', '.join(o.journal_ids.mapped('code'))"/>
  55. </t>
  56. <t t-if="not o.journal_ids">
  57. All
  58. </t>
  59. </div>
  60. <div class="act_as_cell"><span t-field="o.target_move"/></div>
  61. </div>
  62. <t t-set="account" t-value="False"/>
  63. <!-- we use div with css instead of table for tabular data because div do not cut rows at half at page breaks -->
  64. <t t-foreach="report_lines" t-as="line">
  65. <t t-if="account != line.account_id">
  66. <t t-set="account" t-value="line.account_id"/>
  67. &lt;div class="act_as_table list_table" style="margin-top: 10px;"&gt;
  68. <div class="act_as_caption account_title">
  69. <span t-field="account.code"/> - <span t-field="account.name"/>
  70. </div>
  71. <div class="act_as_thead">
  72. <div class="act_as_row labels">
  73. <!--## date-->
  74. <div class="act_as_cell first_column" style="width: 50px;">Date</div>
  75. <!--## move-->
  76. <div class="act_as_cell" style="width: 100px;">Entry</div>
  77. <!--## journal-->
  78. <div class="act_as_cell" style="width: 70px;">Journal</div>
  79. <!--## account code-->
  80. <div class="act_as_cell" style="width: 65px;">Account</div>
  81. <!--## partner-->
  82. <div class="act_as_cell" style="width: 140px;">Partner</div>
  83. <!--## move reference-->
  84. <div class="act_as_cell" style="width: 140px;">Reference</div>
  85. <!--## label-->
  86. <div class="act_as_cell" style="width: 160px;">Label</div>
  87. <!--## debit-->
  88. <div class="act_as_cell amount" style="width: 75px;">Debit</div>
  89. <!--## credit-->
  90. <div class="act_as_cell amount" style="width: 75px;">Credit</div>
  91. <!--## balance cumulated-->
  92. <div class="act_as_cell amount" style="width: 75px;">Cumul. Bal.</div>
  93. <t t-if="has_currency">
  94. <!--## currency balance-->
  95. <div class="act_as_cell amount sep_left" style="width: 75px;">Curr. Balance</div>
  96. <!--## curency code-->
  97. <div class="act_as_cell amount" style="width: 30px; text-align: right;">Curr.</div>
  98. </t>
  99. </div>
  100. </div>
  101. <t t-if="not account.user_type_id.include_initial_balance">
  102. <t t-set="cumul_debit" t-value="0"/>
  103. <t t-set="cumul_credit" t-value="0"/>
  104. <t t-set="cumul_balance" t-value="0"/>
  105. </t>
  106. <!-- # init balance -->
  107. <t t-if="account.user_type_id.include_initial_balance">
  108. <div class="act_as_tbody">
  109. <div class="act_as_row initial_balance">
  110. <!--## date-->
  111. <div class="act_as_cell first_column"></div>
  112. <!--## move-->
  113. <div class="act_as_cell"></div>
  114. <!--## journal-->
  115. <div class="act_as_cell"></div>
  116. <!--## account code-->
  117. <div class="act_as_cell"></div>
  118. <!--## partner-->
  119. <div class="act_as_cell"></div>
  120. <!--## move reference-->
  121. <div class="act_as_cell"></div>
  122. <!--## label-->
  123. <div class="act_as_cell">Initial Balance</div>
  124. <!--## debit-->
  125. <div class="act_as_cell amount">
  126. <t t-if="not line.centralized">
  127. <span t-field="line.init_debit"/>
  128. </t>
  129. <t t-if="line.centralized">
  130. <span t-field="line.init_debit_centralized"/>
  131. </t>
  132. </div>
  133. <!--## credit-->
  134. <div class="act_as_cell amount">
  135. <t t-if="not line.centralized">
  136. <span t-field="line.init_credit"/>
  137. </t>
  138. <t t-if="line.centralized">
  139. <span t-field="line.init_credit_centralized"/>
  140. </t>
  141. </div>
  142. <!--## balance cumulated-->
  143. <div class="act_as_cell amount" style="padding-right: 1px;">
  144. <t t-if="not line.centralized">
  145. <span t-field="line.init_balance"/>
  146. </t>
  147. <t t-if="line.centralized">
  148. <span t-field="line.init_balance"/>
  149. </t>
  150. </div>
  151. <t t-if="has_currency">
  152. <!--## currency balance-->
  153. <div class="act_as_cell amount sep_left">
  154. <t t-if="not line.centralized and account.currency_id">
  155. <span t-field="line.init_balance_curr"/>
  156. </t>
  157. <t t-if="line.centralized and account.currency_id">
  158. <span t-raw="line.init_balance_curr_centralized"/>
  159. </t>
  160. </div>
  161. <!--## curency code-->
  162. <div class="act_as_cell amount"></div>
  163. </t>
  164. </div>
  165. </div>
  166. </t>
  167. </t>
  168. <!-- # lines or centralized lines -->
  169. <div class="act_as_row lines">
  170. <t t-if="not line.centralized">
  171. <!--## date-->
  172. <div class="act_as_cell first_column"><span t-field="line.date"/></div>
  173. <!--## move-->
  174. <div class="act_as_cell"><span t-raw="line.move_name or ''"/></div>
  175. <!--## journal-->
  176. <div class="act_as_cell"><span t-field="line.journal_id.code"/></div>
  177. <!--## account code-->
  178. <div class="act_as_cell"><span t-field="account.code"/></div>
  179. <!--## partner-->
  180. <div class="act_as_cell overflow_ellipsis"><span t-field="line.partner_name"/></div>
  181. <!--## move reference-->
  182. <div class="act_as_cell"><span t-field="line.ref"/></div>
  183. <!--## label-->
  184. <div class="act_as_cell"><span t-field="line.label"/></div>
  185. <!--## debit-->
  186. <div class="act_as_cell amount"><span t-field="line.debit"/></div>
  187. <!--## credit-->
  188. <div class="act_as_cell amount"><span t-field="line.credit"/></div>
  189. <!--## balance cumulated-->
  190. <div class="act_as_cell amount" style="padding-right: 1px;">
  191. <t t-if="not account.user_type_id.include_initial_balance">
  192. <t t-set="cumul_debit" t-value="cumul_debit + line.debit"/>
  193. <t t-set="cumul_credit" t-value="cumul_credit + line.credit"/>
  194. <t t-set="cumul_balance" t-value="cumul_balance + line.balance"/>
  195. <span t-raw="cumul_balance"/>
  196. </t>
  197. <t t-if="account.user_type_id.include_initial_balance">
  198. <span t-field="line.cumul_balance"/>
  199. </t>
  200. </div>
  201. <t t-if="has_currency">
  202. <!--## currency balance-->
  203. <div class="act_as_cell amount" style="padding-right: 1px;">
  204. <span t-field="line.amount_currency"/>
  205. </div>
  206. <!--## curency code-->
  207. <div class="act_as_cell amount" style="text-align: right;"><span t-field="line.currency_code"/></div>
  208. </t>
  209. </t>
  210. <t t-if="line.centralized and line.period_last">
  211. <!--## date-->
  212. <div class="act_as_cell first_column"><span t-field="line.month"/></div>
  213. <!--## move-->
  214. <div class="act_as_cell">Month centralization</div>
  215. <!--## journal-->
  216. <div class="act_as_cell"><span t-field="line.journal_id.code"/></div>
  217. <!--## account code-->
  218. <div class="act_as_cell"><span t-field="account.code"/></div>
  219. <!--## partner-->
  220. <div class="act_as_cell overflow_ellipsis"><span t-field="line.partner_name"/> <span t-if="line.partner_ref" t-field="line.partner_ref"/></div>
  221. <!--## move reference-->
  222. <div class="act_as_cell"></div>
  223. <!--## label-->
  224. <div class="act_as_cell"></div>
  225. <!--## debit-->
  226. <div class="act_as_cell amount"><span t-field="line.debit_centralized"/></div>
  227. <!--## credit-->
  228. <div class="act_as_cell amount"><span t-field="line.credit_centralized"/></div>
  229. <!--## balance cumulated-->
  230. <div class="act_as_cell amount" style="padding-right: 1px;"><span t-field="line.cumul_balance"/></div>
  231. <t t-if="has_currency">
  232. <!--## currency balance-->
  233. <div class="act_as_cell amount sep_left"><span t-if="account.currency_id" t-field="line.balance_curr_centralized"/></div>
  234. <!--## curency code-->
  235. <div class="act_as_cell amount" style="text-align: right;"><span t-field="line.currency_code"/></div>
  236. </t>
  237. </t>
  238. </div>
  239. <!-- # Total -->
  240. <t t-if="(line_index + 1) == len(report_lines) or line.account_id != report_lines[line_index + 1].account_id">
  241. <div class="act_as_table list_table">
  242. <div class="act_as_row labels" style="font-weight: bold;">
  243. <!--## date-->
  244. <div class="act_as_cell first_column" style="width: 425;"><span t-field="account.code"/> - <span t-field="account.name"/></div>
  245. <div class="act_as_cell" style="width: 300px;">Cumulated Balance on Account</div>
  246. <!--## debit-->
  247. <div class="act_as_cell amount" style="width: 75px;">
  248. <t t-if="account.user_type_id.include_initial_balance">
  249. <span t-field="line.cumul_debit"/>
  250. </t>
  251. <t t-if="not account.user_type_id.include_initial_balance">
  252. <span t-raw="cumul_debit"/>
  253. </t>
  254. </div>
  255. <!--## credit-->
  256. <div class="act_as_cell amount" style="width: 75px;">
  257. <t t-if="account.user_type_id.include_initial_balance">
  258. <span t-field="line.cumul_credit"/>
  259. </t>
  260. <t t-if="not account.user_type_id.include_initial_balance">
  261. <span t-raw="cumul_credit"/>
  262. </t>
  263. </div>
  264. <!--## balance cumulated-->
  265. <div class="act_as_cell amount" style="width: 75px; padding-right: 1px;">
  266. <t t-if="account.user_type_id.include_initial_balance">
  267. <span t-field="line.cumul_balance"/>
  268. </t>
  269. <t t-if="not account.user_type_id.include_initial_balance">
  270. <span t-raw="cumul_balance"/>
  271. </t>
  272. </div>
  273. <t t-if="has_currency">
  274. <!--## currency balance-->
  275. <div class="act_as_cell amount sep_left" style="width: 75px;"><t t-if="account.currency_id"><span t-field="line.cumul_balance_curr"/></t></div>
  276. <!--## curency code-->
  277. <div class="act_as_cell amount" style="width: 30px; text-align: right;"></div>
  278. </t>
  279. </div>
  280. &lt;/div&gt;
  281. </div>
  282. </t>
  283. </t>
  284. </div>
  285. </div>
  286. </t>
  287. </t>
  288. </t>
  289. </template>
  290. </odoo>