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.

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