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.

840 lines
42 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <odoo>
  3. <template id="general_ledger">
  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_general_ledger_base" />
  8. </t>
  9. </t>
  10. </t>
  11. </template>
  12. <template id="report_general_ledger_base">
  13. <!-- Saved flag fields into variables, used to define columns display -->
  14. <t t-set="foreign_currency" t-value="foreign_currency" />
  15. <t t-set="filter_partner_ids" t-value="filter_partner_ids" />
  16. <!-- Defines global variables used by internal layout -->
  17. <t t-set="title">General Ledger - <t t-raw="company_name" /> - <t
  18. t-raw="currency_name"
  19. /></t>
  20. <div class="page">
  21. <div class="row">
  22. <h4
  23. class="mt0"
  24. t-esc="title or 'Odoo Report'"
  25. style="text-align: center;"
  26. />
  27. </div>
  28. <!-- Display filters -->
  29. <t t-call="account_financial_report.report_general_ledger_filters" />
  30. <t t-foreach="general_ledger" t-as="account">
  31. <div class="page_break">
  32. <!-- Display account header -->
  33. <div class="act_as_table list_table" style="margin-top: 10px;" />
  34. <div class="act_as_caption account_title" style="width: 100%">
  35. <span
  36. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
  37. /> -
  38. <span
  39. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
  40. />
  41. </div>
  42. <t t-if="not account['partners']">
  43. <!-- Display account move lines without partner regroup -->
  44. <t t-set="type" t-value='"account_type"' />
  45. <t
  46. t-call="account_financial_report.report_general_ledger_lines"
  47. >
  48. <t t-set="account_or_partner_object" t-value="account" />
  49. </t>
  50. <!-- Display account footer -->
  51. <t
  52. t-call="account_financial_report.report_general_ledger_ending_cumul"
  53. >
  54. <t t-set="account_or_partner_object" t-value="account" />
  55. <t t-set="type" t-value='"account_type"' />
  56. </t>
  57. </t>
  58. <t t-if="account['partners']">
  59. <!-- Display account partners -->
  60. <t t-foreach="account['list_partner']" t-as="partner">
  61. <t t-set="type" t-value='"partner_type"' />
  62. <div class="page_break">
  63. <!-- Display partner header -->
  64. <div class="act_as_caption account_title">
  65. <span
  66. t-esc="o._get_atr_from_dict(partner['id'], partners_data, 'name')"
  67. />
  68. </div>
  69. <!-- Display partner move lines -->
  70. <t
  71. t-call="account_financial_report.report_general_ledger_lines"
  72. >
  73. <t
  74. t-set="account_or_partner_object"
  75. t-value="partner"
  76. />
  77. </t>
  78. <!-- Display partner footer -->
  79. <t
  80. t-call="account_financial_report.report_general_ledger_ending_cumul"
  81. >
  82. <t
  83. t-set="account_or_partner_object"
  84. t-value="partner"
  85. />
  86. <t t-set="type" t-value='"partner_type"' />
  87. </t>
  88. <!-- Display account footer -->
  89. <t t-if="not filter_partner_ids">
  90. <t
  91. t-call="account_financial_report.report_general_ledger_ending_cumul"
  92. >
  93. <t
  94. t-set="account_or_partner_object"
  95. t-value="account"
  96. />
  97. <t t-set="type" t-value='"account_type"' />
  98. </t>
  99. </t>
  100. </div>
  101. </t>
  102. </t>
  103. </div>
  104. </t>
  105. </div>
  106. </template>
  107. <template id="account_financial_report.report_general_ledger_filters">
  108. <div class="act_as_table data_table" style="width: 100%;">
  109. <div class="act_as_row labels">
  110. <div class="act_as_cell">Date range filter</div>
  111. <div class="act_as_cell">Target moves filter</div>
  112. <div class="act_as_cell">Account balance at 0 filter</div>
  113. <div class="act_as_cell">Centralize filter</div>
  114. <div class="act_as_cell">Show analytic tags</div>
  115. </div>
  116. <div class="act_as_row">
  117. <div class="act_as_cell">
  118. From: <span t-esc="date_from" /> To: <span t-esc="date_to" />
  119. </div>
  120. <div class="act_as_cell">
  121. <t t-if="only_posted_moves">All posted entries</t>
  122. <t t-if="not only_posted_moves">All entries</t>
  123. </div>
  124. <div class="act_as_cell">
  125. <t t-if="hide_account_at_0">Hide</t>
  126. <t t-if="not hide_account_at_0">Show</t>
  127. </div>
  128. <div class="act_as_cell">
  129. <t t-if="centralize">Yes</t>
  130. <t t-if="not centralize">No</t>
  131. </div>
  132. <div class="act_as_cell">
  133. <t t-if="show_analytic_tags">Yes</t>
  134. <t t-if="not show_analytic_tags">No</t>
  135. </div>
  136. </div>
  137. </div>
  138. </template>
  139. <template id="account_financial_report.report_general_ledger_lines">
  140. <div class="act_as_table data_table" style="width: 100%;">
  141. <!-- Display table headers for lines -->
  142. <div class="act_as_thead">
  143. <div class="act_as_row labels">
  144. <!--## date-->
  145. <div class="act_as_cell first_column" style="width: 3.51%;">
  146. Date</div>
  147. <!--## move-->
  148. <div class="act_as_cell" style="width: 8.03%">Entry</div>
  149. <!--## journal-->
  150. <div class="act_as_cell" style="width: 4.13%;">Journal</div>
  151. <!--## account code-->
  152. <div class="act_as_cell" style="width: 4.75%;">Account</div>
  153. <!--## account code-->
  154. <div class="act_as_cell" style="width: 8.89%;">Taxes</div>
  155. <!--## partner-->
  156. <div class="act_as_cell" style="width: 12.01%;">Partner
  157. </div>
  158. <!--## ref - label-->
  159. <div class="act_as_cell" style="width: 22.9%;">Ref -
  160. Label</div>
  161. <t t-if="show_cost_center">
  162. <!--## cost_center-->
  163. <div class="act_as_cell" style="width: 8.03%;">Cost
  164. center</div>
  165. </t>
  166. <t t-if="show_analytic_tags">
  167. <!--## analytic tags-->
  168. <div class="act_as_cell" style="width: 4.75%;">Tags</div>
  169. </t>
  170. <!--## matching_number-->
  171. <div class="act_as_cell" style="width: 2.41%;">Rec.</div>
  172. <!--## debit-->
  173. <div class="act_as_cell amount" style="width: 6.02%;">Debit</div>
  174. <!--## credit-->
  175. <div class="act_as_cell amount" style="width: 6.02%;">Credit</div>
  176. <!--## balance cumulated-->
  177. <div
  178. class="act_as_cell amount"
  179. style="width: 6.02%;"
  180. >Cumul. Bal.</div>
  181. <t t-if="foreign_currency">
  182. <!--## currency_name-->
  183. <div class="act_as_cell" style="width: 2.08%;">Cur.</div>
  184. <!--## amount_currency-->
  185. <div
  186. class="act_as_cell amount"
  187. style="width: 5.19%;"
  188. >Amount cur.</div>
  189. </t>
  190. </div>
  191. </div>
  192. <!-- Display first line with initial balance -->
  193. <div class="act_as_row lines">
  194. <!--## date-->
  195. <div class="act_as_cell" />
  196. <!--## move-->
  197. <div class="act_as_cell" />
  198. <!--## journal-->
  199. <div class="act_as_cell" />
  200. <!--## account code-->
  201. <div class="act_as_cell" />
  202. <!--## taxes-->
  203. <div class="act_as_cell" />
  204. <!--## partner-->
  205. <div class="act_as_cell" />
  206. <!--## ref - label-->
  207. <div class="act_as_cell amount">Initial balance</div>
  208. <t t-if="show_cost_center">
  209. <!--## cost_center-->
  210. <div class="act_as_cell" />
  211. </t>
  212. <t t-if="show_analytic_tags">
  213. <!--## analytic tags-->
  214. <div class="act_as_cell" />
  215. </t>
  216. <!--## matching_number-->
  217. <div class="act_as_cell" />
  218. <!--## debit-->
  219. <div class="act_as_cell amount">
  220. <t t-if="type == 'account_type'">
  221. <t
  222. t-set="domain"
  223. t-value="[('account_id', '=', account['id']),
  224. ('date', '&lt;', date_from),
  225. ('debit', '&lt;&gt;', 0)]"
  226. />
  227. <span>
  228. <a
  229. t-att-data-domain="domain"
  230. t-att-data-res-model="'account.move.line'"
  231. class="o_account_financial_reports_web_action_monetary_multi"
  232. style="color: black;"
  233. >
  234. <t
  235. t-raw="account_or_partner_object['init_bal']['debit']"
  236. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  237. />
  238. </a>
  239. </span>
  240. </t>
  241. <t t-if="type == 'partner_type'">
  242. <t
  243. t-set="domain"
  244. t-value="[('account_id', '=', account['id']),
  245. ('partner_id', '=', partner['id']),
  246. ('date', '&lt;', date_from),
  247. ('debit', '&lt;&gt;', 0)]"
  248. />
  249. <span>
  250. <a
  251. t-att-data-domain="domain"
  252. t-att-data-res-model="'account.move.line'"
  253. class="o_account_financial_reports_web_action_monetary_multi"
  254. style="color: black;"
  255. >
  256. <t
  257. t-raw="account_or_partner_object['init_bal']['debit']"
  258. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  259. />
  260. </a>
  261. </span>
  262. </t>
  263. </div>
  264. <!--## credit-->
  265. <div class="act_as_cell amount">
  266. <t t-if="type == 'account_type'">
  267. <t
  268. t-set="domain"
  269. t-value="[('account_id', '=', account['id']),
  270. ('date', '&lt;', date_from),
  271. ('credit', '&lt;&gt;', 0)]"
  272. />
  273. <span>
  274. <a
  275. t-att-data-domain="domain"
  276. t-att-data-res-model="'account.move.line'"
  277. class="o_account_financial_reports_web_action_monetary_multi"
  278. style="color: black;"
  279. >
  280. <t
  281. t-raw="account_or_partner_object['init_bal']['credit']"
  282. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  283. />
  284. </a>
  285. </span>
  286. </t>
  287. <t t-if="type == 'partner_type'">
  288. <t
  289. t-set="domain"
  290. t-value="[('account_id', '=', account['id']),
  291. ('partner_id', '=', partner['id']),
  292. ('date', '&lt;', date_from),
  293. ('credit', '&lt;&gt;', 0)]"
  294. />
  295. <span>
  296. <a
  297. t-att-data-domain="domain"
  298. t-att-data-res-model="'account.move.line'"
  299. class="o_account_financial_reports_web_action_monetary_multi"
  300. style="color: black;"
  301. >
  302. <t
  303. t-raw="account_or_partner_object['init_bal']['credit']"
  304. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  305. />
  306. </a>
  307. </span>
  308. </t>
  309. </div>
  310. <!--## balance cumulated-->
  311. <div class="act_as_cell amount">
  312. <t t-if="type == 'account_type'">
  313. <t
  314. t-set="domain"
  315. t-value="[('account_id', '=', account['id']),
  316. ('date', '&lt;', date_from)]"
  317. />
  318. <span>
  319. <a
  320. t-att-data-domain="domain"
  321. t-att-data-res-model="'account.move.line'"
  322. class="o_account_financial_reports_web_action_monetary_multi"
  323. style="color: black;"
  324. >
  325. <t
  326. t-raw="account_or_partner_object['init_bal']['balance']"
  327. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  328. />
  329. </a>
  330. </span>
  331. </t>
  332. <t t-if="type == 'partner_type'">
  333. <t
  334. t-set="domain"
  335. t-value="[('account_id', '=', account['id']),
  336. ('partner_id', '=', partner['id']),
  337. ('date', '&lt;', date_from)]"
  338. />
  339. <span>
  340. <a
  341. t-att-data-domain="domain"
  342. t-att-data-res-model="'account.move.line'"
  343. class="o_account_financial_reports_web_action_monetary_multi"
  344. style="color: black;"
  345. >
  346. <t
  347. t-raw="account_or_partner_object['init_bal']['balance']"
  348. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  349. />
  350. </a>
  351. </span>
  352. </t>
  353. </div>
  354. <t t-if="foreign_currency">
  355. <t
  356. t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  357. >
  358. <div class="act_as_cell amount" style="width: 2.08%;">
  359. <span
  360. t-field="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
  361. />
  362. </div>
  363. <div class="act_as_cell amount" style="width: 5.19%;">
  364. <t t-if="type == 'account_type'">
  365. <t
  366. t-set="domain"
  367. t-value="[('account_id', '=', account['id']),
  368. ('date', '&lt;', o.date_from)]"
  369. />
  370. <span>
  371. <a
  372. t-att-data-domain="domain"
  373. t-att-data-res-model="'account.move.line'"
  374. class="o_account_financial_reports_web_action_monetary_multi"
  375. style="color: black;"
  376. >
  377. <t
  378. t-raw="account_or_partner_object['init_bal']['bal_curr']"
  379. t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"
  380. />
  381. </a>
  382. </span>
  383. </t>
  384. <t t-if="type == 'partner_type'">
  385. <t
  386. t-set="domain"
  387. t-value="[('account_id', '=', account['id']),
  388. ('partner_id', '=', partner['id']),
  389. ('date', '&lt;', o.date_from)]"
  390. />
  391. <span>
  392. <a
  393. t-att-data-domain="domain"
  394. t-att-data-res-model="'account.move.line'"
  395. class="o_account_financial_reports_web_action_monetary_multi"
  396. style="color: black;"
  397. >
  398. <t
  399. t-raw="account_or_partner_object['init_bal']['bal_curr']"
  400. t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"
  401. />
  402. </a>
  403. </span>
  404. </t>
  405. </div>
  406. </t>
  407. <t
  408. t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  409. >
  410. <div class="act_as_cell" style="width: 2.08%;" />
  411. <div class="act_as_cell" style="width: 5.19%;" />
  412. </t>
  413. </t>
  414. </div>
  415. <!-- Display each lines -->
  416. <t t-foreach="account_or_partner_object['move_lines']" t-as="line">
  417. <!-- # lines or centralized lines -->
  418. <div class="act_as_row lines">
  419. <!--## date-->
  420. <div class="act_as_cell left">
  421. <t t-set="res_model" t-value="'account.move.line'" />
  422. <span>
  423. <t t-if="line['id']">
  424. <a
  425. t-att-data-active-id="line['id']"
  426. t-att-data-res-model="res_model"
  427. class="o_account_financial_reports_web_action"
  428. style="color: black;"
  429. >
  430. <!--## We don't use t-field because it throws an error on click -->
  431. <t
  432. t-esc="line['date']"
  433. t-options="{'widget': 'date'}"
  434. />
  435. </a>
  436. </t>
  437. <t t-if="not line['id']">
  438. <a
  439. class="o_account_financial_reports_web_action"
  440. style="color: black;"
  441. >
  442. <!--## We don't use t-field because it throws an error on click -->
  443. <t
  444. t-esc="line['date']"
  445. t-options="{'widget': 'date'}"
  446. />
  447. </a>
  448. </t>
  449. </span>
  450. </div>
  451. <!--## move-->
  452. <div class="act_as_cell left">
  453. <t t-set="res_model" t-value="'account.move'" />
  454. <t t-if="line['entry_id']">
  455. <span>
  456. <a
  457. t-att-data-active-id="line['entry_id']"
  458. t-att-data-res-model="res_model"
  459. class="o_account_financial_reports_web_action"
  460. style="color: black;"
  461. >
  462. <t t-raw="line['entry']" />
  463. </a>
  464. </span>
  465. </t>
  466. </div>
  467. <!--## journal-->
  468. <div class="act_as_cell left">
  469. <t t-set="res_model" t-value="'account.journal'" />
  470. <span>
  471. <a
  472. t-att-data-active-id="line['journal_id']"
  473. t-att-data-res-model="res_model"
  474. class="o_account_financial_reports_web_action"
  475. style="color: black;"
  476. >
  477. <t
  478. t-raw="o._get_atr_from_dict(line['journal_id'], journals_data, 'code')"
  479. />
  480. </a>
  481. </span>
  482. </div>
  483. <!--## account code-->
  484. <div class="act_as_cell left">
  485. <t t-set="res_model" t-value="'account.account'" />
  486. <span>
  487. <a
  488. t-att-data-active-id="account['id']"
  489. t-att-data-res-model="res_model"
  490. class="o_account_financial_reports_web_action"
  491. style="color: black;"
  492. >
  493. <t
  494. t-raw="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
  495. />
  496. </a>
  497. </span>
  498. </div>
  499. <!--## taxes-->
  500. <div class="act_as_cell left">
  501. <t t-if="taxes_data and line['tax_ids']">
  502. <t t-foreach="line['tax_ids']" t-as="tax_id">
  503. <span
  504. t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'amount')"
  505. />
  506. <span
  507. t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'string')"
  508. />
  509. </t>
  510. </t>
  511. </div>
  512. <!--## partner-->
  513. <div class="act_as_cell left">
  514. <t t-set="res_model" t-value="'res.partner'" />
  515. <span t-if="line['partner_id']">
  516. <a
  517. t-att-data-active-id="line['partner_id']"
  518. t-att-data-res-model="res_model"
  519. class="o_account_financial_reports_web_action"
  520. style="color: black;"
  521. >
  522. <t t-raw="line['partner_name']" />
  523. </a>
  524. </span>
  525. </div>
  526. <!--## ref - label-->
  527. <div class="act_as_cell left">
  528. <t t-set="res_model" t-value="'account.move.line'" />
  529. <t t-if="line['id']">
  530. <span>
  531. <a
  532. t-att-data-active-id="line['id']"
  533. t-att-data-res-model="res_model"
  534. class="o_account_financial_reports_web_action"
  535. style="color: black;"
  536. >
  537. <t t-raw="line['ref']" />
  538. </a>
  539. </span>
  540. </t>
  541. <t t-if="not line['id']">
  542. <span>
  543. <a
  544. class="o_account_financial_reports_web_action"
  545. style="color: black;"
  546. >
  547. <t t-raw="line['ref']" />
  548. </a>
  549. </span>
  550. </t>
  551. </div>
  552. <!--## cost_center-->
  553. <t t-if="show_cost_center">
  554. <div class="act_as_cell left">
  555. <t t-set="res_model" t-value="'account.analytic.account'" />
  556. <span t-if="line.cost_center">
  557. <a
  558. t-att-data-active-id="line.move_line_id.analytic_account_id.id"
  559. t-att-data-res-model="res_model"
  560. class="o_account_financial_reports_web_action"
  561. style="color: black;"
  562. >
  563. <t t-raw="line.cost_center" />
  564. </a>
  565. </span>
  566. </div>
  567. </t>
  568. <t t-if="show_analytic_tags">
  569. <!--## analytic tags-->
  570. <div class="act_as_cell left">
  571. <t t-if="line['tag_ids']">
  572. <t t-foreach="line['tag_ids']" t-as="tag_id">
  573. <span
  574. t-esc="o._get_atr_from_dict(tag_id, tags_data, 'name')"
  575. />
  576. </t>
  577. </t>
  578. </div>
  579. </t>
  580. <!--## matching_number-->
  581. <div class="act_as_cell">
  582. <t t-set="res_model" t-value="'account.full.reconcile'" />
  583. <span t-if="line['rec_id']">
  584. <a
  585. t-att-data-active-id="line['rec_id']"
  586. t-att-data-res-model="res_model"
  587. class="o_account_financial_reports_web_action"
  588. style="color: black;"
  589. >
  590. <t t-raw="line['rec_name']" />
  591. </a>
  592. </span>
  593. </div>
  594. <!--## debit-->
  595. <div class="act_as_cell amount">
  596. <t t-set="res_model" t-value="'account.move.line'" />
  597. <t t-if="line['id']">
  598. <span>
  599. <a
  600. t-att-data-active-id="line['id']"
  601. t-att-data-res-model="res_model"
  602. class="o_account_financial_reports_web_action_monetary"
  603. style="color: black;"
  604. >
  605. <t
  606. t-raw="line['debit']"
  607. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  608. />
  609. </a>
  610. </span>
  611. </t>
  612. <t t-if="not line['id']">
  613. <span>
  614. <a
  615. class="o_account_financial_reports_web_action_monetary"
  616. style="color: black;"
  617. >
  618. <t
  619. t-raw="line['debit']"
  620. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  621. />
  622. </a>
  623. </span>
  624. </t>
  625. </div>
  626. <!--## credit-->
  627. <div class="act_as_cell amount">
  628. <t t-set="res_model" t-value="'account.move.line'" />
  629. <t t-if="line['id']">
  630. <span>
  631. <a
  632. t-att-data-active-id="line['id']"
  633. t-att-data-res-model="res_model"
  634. class="o_account_financial_reports_web_action_monetary"
  635. style="color: black;"
  636. >
  637. <t
  638. t-raw="line['credit']"
  639. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  640. />
  641. </a>
  642. </span>
  643. </t>
  644. <t t-if="not line['id']">
  645. <span>
  646. <a
  647. class="o_account_financial_reports_web_action_monetary"
  648. style="color: black;"
  649. >
  650. <t
  651. t-raw="line['credit']"
  652. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  653. />
  654. </a>
  655. </span>
  656. </t>
  657. </div>
  658. <!--## balance cumulated-->
  659. <div class="act_as_cell amount">
  660. <t t-set="res_model" t-value="'account.move.line'" />
  661. <t t-if="line['id']">
  662. <span>
  663. <a
  664. t-att-data-active-id="line['id']"
  665. t-att-data-res-model="res_model"
  666. class="o_account_financial_reports_web_action_monetary"
  667. style="color: black;"
  668. >
  669. <t
  670. t-raw="line['balance']"
  671. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  672. />
  673. </a>
  674. </span>
  675. </t>
  676. <t t-if="not line['id']">
  677. <span>
  678. <a
  679. class="o_account_financial_reports_web_action_monetary"
  680. style="color: black;"
  681. >
  682. <t
  683. t-raw="line['balance']"
  684. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  685. />
  686. </a>
  687. </span>
  688. </t>
  689. </div>
  690. <t t-if="foreign_currency">
  691. <t t-if="line['currency_id']">
  692. <!--## currency_name-->
  693. <div class="act_as_cell amount" style="width: 2.08%;">
  694. <span t-esc="line['currency_id'][1]" />
  695. </div>
  696. <!--## amount_currency-->
  697. <div class="act_as_cell amount" style="width: 5.19%;">
  698. <t t-set="res_model" t-value="'account.move.line'" />
  699. <span>
  700. <a
  701. t-att-data-active-id="line['id']"
  702. t-att-data-res-model="res_model"
  703. class="o_account_financial_reports_web_action"
  704. style="color: black;"
  705. >
  706. <t t-raw="line['bal_curr']" />
  707. </a>
  708. </span>
  709. </div>
  710. </t>
  711. <t t-if="not line['currency_id']">
  712. <!--## currency_name-->
  713. <div class="act_as_cell amount" style="width: 2.08%;" />
  714. <!--## amount_currency-->
  715. <div class="act_as_cell amount" style="width: 5.19%;" />
  716. </t>
  717. </t>
  718. </div>
  719. </t>
  720. </div>
  721. </template>
  722. <template id="account_financial_report.report_general_ledger_ending_cumul">
  723. <!-- Display ending balance line for account or partner -->
  724. <div class="act_as_table list_table" style="width: 100%;">
  725. <div class="act_as_row labels" style="font-weight: bold;">
  726. <!--## date-->
  727. <t t-if='type == "account_type"'>
  728. <div class="act_as_cell first_column" style="width: 41.32%;"><span
  729. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
  730. /> - <span
  731. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
  732. /></div>
  733. <div
  734. class="act_as_cell right"
  735. style="width: 22.9%;"
  736. >Ending balance</div>
  737. </t>
  738. <t t-if='type == "partner_type"'>
  739. <div class="act_as_cell first_column" style="width: 41.32%;" />
  740. <div
  741. class="act_as_cell right"
  742. style="width: 22.9%;"
  743. >Partner ending balance</div>
  744. </t>
  745. <t t-if="show_cost_center">
  746. <!--## cost_center-->
  747. <div class="act_as_cell" style="width: 8.03%" />
  748. </t>
  749. <t t-if="show_analytic_tags">
  750. <!--## analytic tags-->
  751. <div class="act_as_cell" style="width: 4.75%;" />
  752. </t>
  753. <!--## matching_number-->
  754. <div class="act_as_cell" style="width: 2.41%;" />
  755. <!--## debit-->
  756. <div class="act_as_cell amount" style="width: 6.02%;">
  757. <span
  758. t-esc="account_or_partner_object['fin_bal']['debit']"
  759. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  760. />
  761. </div>
  762. <!--## credit-->
  763. <div class="act_as_cell amount" style="width: 6.02%;">
  764. <span
  765. t-esc="account_or_partner_object['fin_bal']['credit']"
  766. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  767. />
  768. </div>
  769. <!--## balance cumulated-->
  770. <div class="act_as_cell amount" style="width: 6.02%;">
  771. <span
  772. t-esc="account_or_partner_object['fin_bal']['balance']"
  773. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  774. />
  775. </div>
  776. <!--## currency_name + amount_currency-->
  777. <t t-if="foreign_currency">
  778. <t
  779. t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  780. >
  781. <div class="act_as_cell amount" style="width: 2.08%;">
  782. <span
  783. t-field="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
  784. />
  785. </div>
  786. <div class="act_as_cell amount" style="width: 5.19%;">
  787. <t t-if="type == 'account_type'">
  788. <t
  789. t-set="domain"
  790. t-value="[('account_id', '=', account['id']),
  791. ('date', '&lt;', date_from)]"
  792. />
  793. <span>
  794. <a
  795. t-att-data-domain="domain"
  796. t-att-data-res-model="'account.move.line'"
  797. class="o_account_financial_reports_web_action_monetary_multi"
  798. style="color: black;"
  799. >
  800. <t
  801. t-raw="account_or_partner_object['fin_bal']['bal_curr']"
  802. t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.account_id.currency_id}"
  803. />
  804. </a>
  805. </span>
  806. </t>
  807. <t t-if="type == 'partner_type'">
  808. <t
  809. t-set="domain"
  810. t-value="[('account_id', '=', account['id']),
  811. ('partner_id', '=', partner['id']),
  812. ('date', '&lt;', date_from)]"
  813. />
  814. <span>
  815. <a
  816. t-att-data-domain="domain"
  817. t-att-data-res-model="'account.move.line'"
  818. class="o_account_financial_reports_web_action_monetary_multi"
  819. style="color: black;"
  820. >
  821. <t
  822. t-raw="account_or_partner_object['fin_bal']['bal_curr']"
  823. t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.report_account_id.currency_id}"
  824. />
  825. </a>
  826. </span>
  827. </t>
  828. </div>
  829. </t>
  830. <t
  831. t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  832. >
  833. <div class="act_as_cell amount" style="width: 2.08%;" />
  834. <div class="act_as_cell amount" style="width: 5.19%;" />
  835. </t>
  836. </t>
  837. </div>
  838. </div>
  839. </template>
  840. </odoo>