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.

688 lines
40 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="account_financial_report.report_trial_balance_qweb">
  4. <t t-call="web.html_container">
  5. <t t-foreach="docs" t-as="o">
  6. <t t-call="account_financial_report.internal_layout">
  7. <t t-call="account_financial_report.report_trial_balance_base"/>
  8. </t>
  9. </t>
  10. </t>
  11. </template>
  12. <template id="account_financial_report.report_trial_balance_base">
  13. <!-- Saved flag fields into variables, used to define columns display -->
  14. <t t-set="show_partner_details" t-value="o.show_partner_details"/>
  15. <t t-set="foreign_currency" t-value="o.foreign_currency"/>
  16. <!-- Defines global variables used by internal layout -->
  17. <t t-set="title">Trial Balance - <t t-raw="o.company_id.name"/> - <t t-raw="o.company_id.currency_id.name"/></t>
  18. <t t-set="company_name" t-value="o.company_id.name"/>
  19. <t t-set="res_company" t-value="o.company_id"/>
  20. <div class="page">
  21. <div class="row">
  22. <h4 class="mt0" t-esc="title or 'Odoo Report'" style="text-align: center;"/>
  23. </div>
  24. <!-- Display filters -->
  25. <t t-call="account_financial_report.report_trial_balance_filters"/>
  26. <div class="act_as_table list_table" style="margin-top: 10px;"/>
  27. <!-- Display account lines -->
  28. <t t-if="not show_partner_details">
  29. <div class="act_as_table data_table" style="width: 100%;">
  30. <!-- Display account header -->
  31. <t t-call="account_financial_report.report_trial_balance_lines_header"/>
  32. <!-- Display each lines -->
  33. <t t-foreach="o.account_ids.filtered(lambda a: not a.hide_line)" t-as="line">
  34. <t t-set="type" t-value='"account_type"'/>
  35. <!-- Adapt -->
  36. <t t-set="style" t-value="'font-size:8px;'"/>
  37. <t t-set="padding" t-value="line.level * 4"/>
  38. <t t-if="o.hide_account_at_0">
  39. <t t-set="style" t-value="'font-size: 14px;'"/>
  40. </t>
  41. <t t-if="o.hierarchy_on != 'none'">
  42. <t t-set="style" t-value="'font-size: ' + str(14 - line.level) + 'px; margin-left: ' + str(line.level * 4) + 'px;'"/>
  43. </t>
  44. <t t-if="line.account_group_id">
  45. <t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
  46. </t>
  47. <!-- Display account lines -->
  48. <t t-call="account_financial_report.report_trial_balance_line"/>
  49. <!-- Adapt style -->
  50. </t>
  51. </div>
  52. </t>
  53. <!-- Display partner lines -->
  54. <t t-if="show_partner_details">
  55. <t t-set="padding" t-value="0"/>
  56. <t t-foreach="o.account_ids" t-as="account">
  57. <div class="page_break">
  58. <t t-set="style" t-value="'font-size:8px;'"/>
  59. <t t-set="padding" t-value="account.level * 4"/>
  60. <t t-set="style" t-value="'font-size: ' + str(14 - account.level) + 'px; margin-left: ' + str(account.level * 4) + 'px;'"/>
  61. <!-- Display account header -->
  62. <div class="act_as_table list_table" style="margin-top: 10px;"/>
  63. <div class="act_as_caption account_title"
  64. style="width: 100%;">
  65. <t t-set="res_model" t-value="'account.account'"/>
  66. <span>
  67. <a t-att-data-active-id="account.account_id.id"
  68. t-att-data-res-model="res_model"
  69. class="o_account_financial_reports_web_action"
  70. t-att-style="style">
  71. <t t-raw="account.code"/> - <t t-raw="account.name"/></a>
  72. </span>
  73. </div>
  74. <div class="act_as_table data_table"
  75. style="width: 100%;">
  76. <!-- Display account/partner header -->
  77. <t t-call="account_financial_report.report_trial_balance_lines_header"/>
  78. <!-- Adapt style -->
  79. <t t-set="padding" t-value="padding+4"/>
  80. <!-- Display each partners -->
  81. <t t-foreach="account.partner_ids" t-as="line">
  82. <t t-set="type" t-value='"partner_type"'/>
  83. <!-- Display partner line -->
  84. <t t-call="account_financial_report.report_trial_balance_line"/>
  85. </t>
  86. <t t-set="padding" t-value="padding-4"/>
  87. </div>
  88. <!-- Display account footer -->
  89. <t t-set="type" t-value='"account_type"'/>
  90. <t t-call="account_financial_report.report_trial_balance_account_footer"/>
  91. </div>
  92. </t>
  93. </t>
  94. </div>
  95. </template>
  96. <template id="account_financial_report.report_trial_balance_filters">
  97. <div class="act_as_table data_table" style="width: 100%;">
  98. <div class="act_as_row labels">
  99. <div class="act_as_cell">Date range filter</div>
  100. <div class="act_as_cell">Target moves filter</div>
  101. <div class="act_as_cell">Account at 0 filter</div>
  102. <div class="act_as_cell">Limit hierarchy levels</div>
  103. </div>
  104. <div class="act_as_row">
  105. <div class="act_as_cell">
  106. From: <span t-field="o.date_from"/> To: <span t-field="o.date_to"/>
  107. </div>
  108. <div class="act_as_cell">
  109. <t t-if="o.only_posted_moves">All posted entries</t>
  110. <t t-if="not o.only_posted_moves">All entries</t>
  111. </div>
  112. <div class="act_as_cell">
  113. <t t-if="o.hide_account_at_0">Hide</t>
  114. <t t-if="not o.hide_account_at_0">Show</t>
  115. </div>
  116. <div class="act_as_cell">
  117. <t t-if="o.limit_hierarchy_level">
  118. Level <span t-field="o.show_hierarchy_level"/>
  119. </t>
  120. <t t-if="not o.limit_hierarchy_level">
  121. No limit
  122. </t>
  123. </div>
  124. </div>
  125. </div>
  126. </template>
  127. <template id="account_financial_report.report_trial_balance_lines_header">
  128. <!-- Display table headers for lines -->
  129. <div class="act_as_thead">
  130. <div class="act_as_row labels">
  131. <t t-if="not show_partner_details">
  132. <!--## Code-->
  133. <div class="act_as_cell" style="width: 8.86%;">Code</div>
  134. <!--## Account-->
  135. <div class="act_as_cell" style="width: 37.58%;">Account
  136. </div>
  137. </t>
  138. <t t-if="show_partner_details">
  139. <!--## Partner-->
  140. <div class="act_as_cell" style="width: 46.44%;">Partner
  141. </div>
  142. </t>
  143. <!--## Initial balance-->
  144. <div class="act_as_cell" style="width: 9.64%;">Initial
  145. balance</div>
  146. <!--## Debit-->
  147. <div class="act_as_cell" style="width: 9.64%;">Debit</div>
  148. <!--## Credit-->
  149. <div class="act_as_cell" style="width: 9.64%;">Credit</div>
  150. <!--## Period balance-->
  151. <div class="act_as_cell" style="width: 9.64%;">Period balance</div>
  152. <!--## Ending balance-->
  153. <div class="act_as_cell" style="width: 9.64%;">Ending balance</div>
  154. <t t-if="foreign_currency">
  155. <!--## currency_name-->
  156. <div class="act_as_cell" style="width: 4.43%;">Cur.</div>
  157. <!--## amount_currency-->
  158. <div class="act_as_cell" style="width: 8.86%;">Initial blance cur.</div>
  159. <div class="act_as_cell" style="width: 8.86%;">Ending blance cur.</div>
  160. </t>
  161. </div>
  162. </div>
  163. </template>
  164. <template id="account_financial_report.report_trial_balance_line">
  165. <!-- # line -->
  166. <div class="act_as_row lines">
  167. <t t-if="not show_partner_details">
  168. <!--## Code-->
  169. <div class="act_as_cell left">
  170. <t t-if="line.account_id">
  171. <t t-set="res_model" t-value="'account.account'"/>
  172. <span>
  173. <a t-att-data-active-id="line.account_id.id"
  174. t-att-data-res-model="res_model"
  175. class="o_account_financial_reports_web_action"
  176. t-att-style="style">
  177. <t t-att-style="style" t-raw="line.code"/></a>
  178. </span>
  179. </t>
  180. <t t-if="line.account_group_id">
  181. <t t-set="res_model" t-value="'account.group'"/>
  182. <span>
  183. <a t-att-data-active-id="line.account_group_id.id"
  184. t-att-data-res-model="res_model"
  185. class="o_account_financial_reports_web_action"
  186. t-att-style="style">
  187. <t t-att-style="style" t-raw="line.code"/></a>
  188. </span>
  189. </t>
  190. </div>
  191. </t>
  192. <!--## Account/Partner-->
  193. <div class="act_as_cell left">
  194. <t t-if="type == 'account_type'">
  195. <t t-set="account_or_partner_line" t-value="line"/>
  196. <t t-if="line.account_id">
  197. <t t-set="res_model" t-value="'account.account'"/>
  198. <span>
  199. <a t-att-data-active-id="line.account_id.id"
  200. t-att-data-res-model="res_model"
  201. class="o_account_financial_reports_web_action"
  202. t-att-style="style">
  203. <t t-att-style="style" t-raw="line.name"/></a>
  204. </span>
  205. </t>
  206. <t t-if="line.account_group_id">
  207. <t t-set="res_model" t-value="'account.group'"/>
  208. <span>
  209. <a t-att-data-active-id="line.account_group_id.id"
  210. t-att-data-res-model="res_model"
  211. class="o_account_financial_reports_web_action"
  212. t-att-style="style">
  213. <t t-att-style="style" t-raw="line.name"/></a>
  214. </span>
  215. </t>
  216. </t>
  217. <t t-if="type == 'partner_type'">
  218. <t t-set="account_or_partner_line" t-value="line.report_account_id"/>
  219. <t t-set="res_model" t-value="'res.partner'"/>
  220. <span>
  221. <a t-att-data-active-id="line.partner_id.id"
  222. t-att-data-res-model="res_model"
  223. class="o_account_financial_reports_web_action"
  224. t-att-style="style">
  225. <t t-att-style="style" t-raw="line.name"/></a>
  226. </span>
  227. </t>
  228. </div>
  229. <!--## Initial balance-->
  230. <div class="act_as_cell amount">
  231. <t t-if="type == 'account_type'">
  232. <t t-if="line.account_id">
  233. <t t-set="domain"
  234. t-value="[('account_id', '=', line.account_id.id),
  235. ('date', '&lt;', o.date_from.strftime('%Y-%m-%d'))]"/>
  236. <span>
  237. <a t-att-data-domain="domain"
  238. t-att-data-res-model="'account.move.line'"
  239. class="o_account_financial_reports_web_action_monetary_multi"
  240. t-att-style="style">
  241. <t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  242. </span>
  243. </t>
  244. <t t-if="line.account_group_id">
  245. <t t-set="domain"
  246. t-value="[('account_id', 'in', line.compute_account_ids.ids),
  247. ('date', '&lt;', o.date_from.strftime('%Y-%m-%d'))]"/>
  248. <span>
  249. <a t-att-data-domain="domain"
  250. t-att-data-res-model="'account.move.line'"
  251. class="o_account_financial_reports_web_action_monetary_multi"
  252. t-att-style="style">
  253. <t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  254. </span>
  255. </t>
  256. </t>
  257. <t t-if="type == 'partner_type'">
  258. <t t-set="domain"
  259. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  260. ('partner_id', '=', line.partner_id.id),
  261. ('date', '&lt;', o.date_from.strftime('%Y-%m-%d'))]"/>
  262. <span>
  263. <a t-att-data-domain="domain"
  264. t-att-data-res-model="'account.move.line'"
  265. class="o_account_financial_reports_web_action_monetary_multi"
  266. t-att-style="style">
  267. <t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  268. </span>
  269. </t>
  270. </div>
  271. <!--## Debit-->
  272. <div class="act_as_cell amount">
  273. <t t-if="type == 'account_type'">
  274. <t t-if="line.account_id">
  275. <t t-set="domain"
  276. t-value="[('account_id', '=', line.account_id.id),
  277. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  278. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d')),
  279. ('debit', '&lt;&gt;', 0)]"/>
  280. <span>
  281. <a t-att-data-domain="domain"
  282. t-att-data-res-model="'account.move.line'"
  283. class="o_account_financial_reports_web_action_monetary_multi"
  284. t-att-style="style">
  285. <t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  286. </span>
  287. </t>
  288. <t t-if="line.account_group_id">
  289. <t t-set="domain"
  290. t-value="[('account_id', 'in', line.compute_account_ids.ids),
  291. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  292. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d')),
  293. ('debit', '&lt;&gt;', 0)]"/>
  294. <span>
  295. <a t-att-data-domain="domain"
  296. t-att-data-res-model="'account.move.line'"
  297. class="o_account_financial_reports_web_action_monetary_multi"
  298. t-att-style="style">
  299. <t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  300. </span>
  301. </t>
  302. </t>
  303. <t t-if="type == 'partner_type'">
  304. <t t-set="domain"
  305. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  306. ('partner_id', '=', line.partner_id.id),
  307. ('date', '&gt;=', line.report_account_id.report_id.date_from.strftime('%Y-%m-%d')),
  308. ('date', '&lt;=', line.report_account_id.report_id.date_to.strftime('%Y-%m-%d')),
  309. ('debit', '&lt;&gt;', 0)]"/>
  310. <span>
  311. <a t-att-data-domain="domain"
  312. t-att-data-res-model="'account.move.line'"
  313. class="o_account_financial_reports_web_action_monetary_multi"
  314. t-att-style="style">
  315. <t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  316. </span>
  317. </t>
  318. </div>
  319. <!--## Credit-->
  320. <div class="act_as_cell amount">
  321. <t t-if="type == 'account_type'">
  322. <t t-if="line.account_id">
  323. <t t-set="domain"
  324. t-value="[('account_id', '=', line.account_id.id),
  325. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  326. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d')),
  327. ('credit', '&lt;&gt;', 0)]"/>
  328. <span>
  329. <a t-att-data-domain="domain"
  330. t-att-data-res-model="'account.move.line'"
  331. class="o_account_financial_reports_web_action_monetary_multi"
  332. t-att-style="style">
  333. <t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  334. </span>
  335. </t>
  336. <t t-if="line.account_group_id">
  337. <t t-set="domain"
  338. t-value="[('account_id', 'in', line.compute_account_ids.ids),
  339. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  340. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d')),
  341. ('credit', '&lt;&gt;', 0)]"/>
  342. <span>
  343. <a t-att-data-domain="domain"
  344. t-att-data-res-model="'account.move.line'"
  345. class="o_account_financial_reports_web_action_monetary_multi"
  346. t-att-style="style">
  347. <t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  348. </span>
  349. </t>
  350. </t>
  351. <t t-if="type == 'partner_type'">
  352. <t t-set="domain"
  353. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  354. ('partner_id', '=', line.partner_id.id),
  355. ('date', '&gt;=', line.report_account_id.report_id.date_from.strftime('%Y-%m-%d')),
  356. ('date', '&lt;=', line.report_account_id.report_id.date_to.strftime('%Y-%m-%d')),
  357. ('credit', '&lt;&gt;', 0)]"/>
  358. <span>
  359. <a t-att-data-domain="domain"
  360. t-att-data-res-model="'account.move.line'"
  361. class="o_account_financial_reports_web_action_monetary_multi"
  362. t-att-style="style">
  363. <t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  364. </span>
  365. </t>
  366. </div>
  367. <!--## Period balance-->
  368. <div class="act_as_cell amount">
  369. <t t-if="type == 'account_type'">
  370. <t t-if="line.account_id">
  371. <t t-set="domain"
  372. t-value="[('account_id', '=', line.account_id.id),
  373. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  374. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d'))]"/>
  375. <span>
  376. <a t-att-data-domain="domain"
  377. t-att-data-res-model="'account.move.line'"
  378. class="o_account_financial_reports_web_action_monetary_multi"
  379. t-att-style="style">
  380. <t t-att-style="style" t-raw="line.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  381. </span>
  382. </t>
  383. <t t-if="line.account_group_id">
  384. <t t-set="domain"
  385. t-value="[('account_id', 'in', line.compute_account_ids.ids),
  386. ('date', '&gt;=', line.report_id.date_from.strftime('%Y-%m-%d')),
  387. ('date', '&lt;=', line.report_id.date_to.strftime('%Y-%m-%d'))]"/>
  388. <span>
  389. <a t-att-data-domain="domain"
  390. t-att-data-res-model="'account.move.line'"
  391. class="o_account_financial_reports_web_action_multi"
  392. t-att-style="style">
  393. <t t-att-style="style" t-raw="line.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  394. </span>
  395. </t>
  396. </t>
  397. <t t-if="type == 'partner_type'">
  398. <t t-set="domain"
  399. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  400. ('partner_id', '=', line.partner_id.id),
  401. ('date', '&gt;=', line.report_account_id.report_id.date_from.strftime('%Y-%m-%d')),
  402. ('date', '&lt;=', line.report_account_id.report_id.date_to.strftime('%Y-%m-%d'))]"/>
  403. <span>
  404. <a t-att-data-domain="domain"
  405. t-att-data-res-model="'account.move.line'"
  406. class="o_account_financial_reports_web_action_monetary_multi"
  407. t-att-style="style">
  408. <t t-att-style="style" t-raw="line.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  409. </span>
  410. </t>
  411. </div>
  412. <!--## Ending balance-->
  413. <div class="act_as_cell amount">
  414. <t t-if="type == 'account_type'">
  415. <t t-if="line.account_id">
  416. <t t-set="domain"
  417. t-value="[('account_id', '=', line.account_id.id)]"/>
  418. <span>
  419. <a t-att-data-domain="domain"
  420. t-att-data-res-model="'account.move.line'"
  421. class="o_account_financial_reports_web_action_monetary_multi"
  422. t-att-style="style">
  423. <t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  424. </span>
  425. </t>
  426. <t t-if="line.account_group_id">
  427. <t t-set="domain"
  428. t-value="[('account_id', 'in', line.compute_account_ids.ids)]"/>
  429. <span>
  430. <a t-att-data-domain="domain"
  431. t-att-data-res-model="'account.move.line'"
  432. class="o_account_financial_reports_web_action_monetary_multi"
  433. t-att-style="style">
  434. <t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  435. </span>
  436. </t>
  437. </t>
  438. <t t-if="type == 'partner_type'">
  439. <t t-set="domain"
  440. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  441. ('partner_id', '=', line.partner_id.id)]"/>
  442. <span>
  443. <a t-att-data-domain="domain"
  444. t-att-data-res-model="'account.move.line'"
  445. class="o_account_financial_reports_web_action_monetary_multi"
  446. t-att-style="style">
  447. <t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  448. </span>
  449. </t>
  450. </div>
  451. <t t-if="foreign_currency">
  452. <t t-if="account_or_partner_line.currency_id">
  453. <!--## currency_name-->
  454. <div class="act_as_cell" style="width: 4.43%;">
  455. <span t-field="account_or_partner_line.currency_id.display_name"/>
  456. </div>
  457. <!--## Initial balance cur.-->
  458. <div class="act_as_cell amount">
  459. <t t-if="type == 'account_type'">
  460. <t t-if="line.account_id">
  461. <t t-set="domain"
  462. t-value="[('account_id', '=', line.account_id.id)]"/>
  463. <span>
  464. <a t-att-data-domain="domain"
  465. t-att-data-res-model="'account.move.line'"
  466. class="o_account_financial_reports_web_action_monetary_multi"
  467. t-att-style="style">
  468. <t t-att-style="style" t-raw="line.initial_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/></a>
  469. </span>
  470. </t>
  471. <t t-if="line.account_group_id">
  472. <t t-set="domain"
  473. t-value="[('account_id', 'in', line.compute_account_ids.ids)]"/>
  474. <span>
  475. <a t-att-data-domain="domain"
  476. t-att-data-res-model="'account.move.line'"
  477. class="o_account_financial_reports_web_action_monetary_multi"
  478. t-att-style="style">
  479. <t t-att-style="style" t-raw="line.initial_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/></a>
  480. </span>
  481. </t>
  482. </t>
  483. <t t-if="type == 'partner_type'">
  484. <t t-set="domain"
  485. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  486. ('partner_id', '=', line.partner_id.id)]"/>
  487. <span>
  488. <a t-att-data-domain="domain"
  489. t-att-data-res-model="'account.move.line'"
  490. class="o_account_financial_reports_web_action_monetary_multi"
  491. t-att-style="style">
  492. <t t-att-style="style" t-raw="line.initial_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.report_account_id.currency_id}"/></a>
  493. </span>
  494. </t>
  495. </div>
  496. <!--## Ending balance cur.-->
  497. <div class="act_as_cell amount">
  498. <t t-if="type == 'account_type'">
  499. <t t-if="line.account_id">
  500. <t t-set="domain"
  501. t-value="[('account_id', '=', line.account_id.id)]"/>
  502. <span>
  503. <a t-att-data-domain="domain"
  504. t-att-data-res-model="'account.move.line'"
  505. class="o_account_financial_reports_web_action_monetary_multi"
  506. t-att-style="style">
  507. <t t-att-style="style" t-raw="line.final_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/></a>
  508. </span>
  509. </t>
  510. <t t-if="line.account_group_id">
  511. <t t-set="domain"
  512. t-value="[('account_id', 'in', line.compute_account_ids.ids)]"/>
  513. <span>
  514. <a t-att-data-domain="domain"
  515. t-att-data-res-model="'account.move.line'"
  516. class="o_account_financial_reports_web_action_monetary_multi"
  517. t-att-style="style">
  518. <t t-att-style="style" t-raw="line.final_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/></a>
  519. </span>
  520. </t>
  521. </t>
  522. <t t-if="type == 'partner_type'">
  523. <t t-set="domain"
  524. t-value="[('account_id', '=', line.report_account_id.account_id.id),
  525. ('partner_id', '=', line.partner_id.id)]"/>
  526. <span>
  527. <a t-att-data-domain="domain"
  528. t-att-data-res-model="'account.move.line'"
  529. class="o_account_financial_reports_web_action_monetary_multi"
  530. t-att-style="style">
  531. <t t-att-style="style" t-raw="line.final_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': line.report_account_id.currency_id}"/></a>
  532. </span>
  533. </t>
  534. </div>
  535. </t>
  536. <t t-if="not account_or_partner_line.currency_id.id">
  537. <!--## balance_currency-->
  538. <div class="act_as_cell"/>
  539. <div class="act_as_cell"/>
  540. <div class="act_as_cell"/>
  541. </t>
  542. </t>
  543. </div>
  544. </template>
  545. <template id="account_financial_report.report_trial_balance_account_footer">
  546. <!-- Display account footer -->
  547. <div class="act_as_table list_table" style="width: 100%;">
  548. <div class="act_as_row labels" style="font-weight: bold;">
  549. <!--## Account-->
  550. <div class="act_as_cell left" style="width: 61.44%;">
  551. <t t-set="res_model" t-value="'account.account'"/>
  552. <span>
  553. <a t-att-data-active-id="account.account_id.id"
  554. t-att-data-res-model="res_model"
  555. class="o_account_financial_reports_web_action"
  556. t-att-style="style">
  557. <t t-att-style="style" t-raw="account.code"/> - <t t-att-style="style" t-raw="account.name"/></a>
  558. </span>
  559. </div>
  560. <!--## Initial balance-->
  561. <div class="act_as_cell amount" style="width: 9.64%;">
  562. <t t-set="domain"
  563. t-value="[('account_id', '=', account.account_id.id),
  564. ('date', '&lt;', o.date_from.strftime('%Y-%m-%d'))]"/>
  565. <span>
  566. <a t-att-data-domain="domain"
  567. t-att-data-res-model="'account.move.line'"
  568. class="o_account_financial_reports_web_action_monetary_multi"
  569. t-att-style="style">
  570. <t t-att-style="style" t-raw="account.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  571. </span>
  572. </div>
  573. <!--## Debit-->
  574. <div class="act_as_cell amount" style="width: 9.64%;">
  575. <t t-set="domain"
  576. t-value="[('account_id', '=', account.account_id.id),
  577. ('date', '&gt;=', account.report_id.date_from.strftime('%Y-%m-%d')),
  578. ('date', '&lt;=', account.report_id.date_to.strftime('%Y-%m-%d')),
  579. ('debit', '&lt;&gt;', 0)]"/>
  580. <span>
  581. <a t-att-data-domain="domain"
  582. t-att-data-res-model="'account.move.line'"
  583. class="o_account_financial_reports_web_action_monetary_multi"
  584. t-att-style="style">
  585. <t t-att-style="style" t-raw="account.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  586. </span>
  587. </div>
  588. <!--## Credit-->
  589. <div class="act_as_cell amount" style="width: 9.64%;">
  590. <t t-set="domain"
  591. t-value="[('account_id', '=', account.account_id.id),
  592. ('date', '&gt;=', account.report_id.date_from.strftime('%Y-%m-%d')),
  593. ('date', '&lt;=', account.report_id.date_to.strftime('%Y-%m-%d')),
  594. ('credit', '&lt;&gt;', 0)]"/>
  595. <span>
  596. <a t-att-data-domain="domain"
  597. t-att-data-res-model="'account.move.line'"
  598. class="o_account_financial_reports_web_action_monetary_multi"
  599. t-att-style="style">
  600. <t t-att-style="style" t-raw="account.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  601. </span>
  602. </div>
  603. <!--## Period Balance -->
  604. <div class="act_as_cell amount" style="width: 9.64%;">
  605. <t t-set="domain"
  606. t-value="[('account_id', '=', account.account_id.id),
  607. ('date', '&gt;=', account.report_id.date_from.strftime('%Y-%m-%d')),
  608. ('date', '&lt;=', account.report_id.date_to.strftime('%Y-%m-%d')),
  609. ('period_balance', '&lt;&gt;', 0)]"/>
  610. <span>
  611. <a t-att-data-domain="domain"
  612. t-att-data-res-model="'account.move.line'"
  613. class="o_account_financial_reports_web_action_monetary_multi"
  614. t-att-style="style">
  615. <t t-att-style="style" t-raw="account.period_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  616. </span>
  617. </div>
  618. <!--## Ending balance-->
  619. <div class="act_as_cell amount" style="width: 9.64%;">
  620. <t t-set="domain"
  621. t-value="[('account_id', '=', account.account_id.id)]"/>
  622. <span>
  623. <a t-att-data-domain="domain"
  624. t-att-data-res-model="'account.move.line'"
  625. class="o_account_financial_reports_web_action_monetary_multi"
  626. t-att-style="style" >
  627. <t t-att-style="style" t-raw="account.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  628. </span>
  629. </div>
  630. <t t-if="foreign_currency">
  631. <t t-if="account.currency_id.id">
  632. <!--## currency_name-->
  633. <div class="act_as_cell" style="width: 4.43%;">
  634. <t t-set="domain"
  635. t-value="[('account_id', '=', account.account_id.id)]"/>
  636. <span t-field="account.currency_id.display_name"/>
  637. </div>
  638. <!--## balance_currency-->
  639. <div class="act_as_cell amount" style="width: 8.86%;">
  640. <t t-set="domain"
  641. t-value="[('account_id', '=', account.account_id.id),
  642. ('date', '&lt;', o.date_from.strftime('%Y-%m-%d'))]"/>
  643. <span>
  644. <a t-att-data-domain="domain"
  645. t-att-data-res-model="'account.move.line'"
  646. class="o_account_financial_reports_web_action_monetary_multi"
  647. t-att-style="style">
  648. <t t-att-style="style" t-raw="account.initial_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"/></a>
  649. </span>
  650. </div>
  651. <div class="act_as_cell amount" style="width: 8.86%;">
  652. <t t-set="domain"
  653. t-value="[('account_id', '=', account.account_id.id)]"/>
  654. <span>
  655. <a t-att-data-domain="domain"
  656. t-att-data-res-model="'account.move.line'"
  657. class="o_account_financial_reports_web_action_monetary_multi"
  658. t-att-style="style" >
  659. <t t-att-style="style" t-raw="account.final_balance_foreign_currency" t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"/></a>
  660. </span>
  661. </div>
  662. </t>
  663. <t t-if="not account.currency_id.id">
  664. <div class="act_as_cell" style="width: 4.43%;"/>
  665. <div class="act_as_cell" style="width: 8.86%;"/>
  666. <div class="act_as_cell" style="width: 8.86%;"/>
  667. </t>
  668. </t>
  669. </div>
  670. </div>
  671. </template>
  672. </odoo>