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.

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