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.

839 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. </div>
  89. </t>
  90. <!-- Display account footer -->
  91. <t t-if="not filter_partner_ids">
  92. <t
  93. t-call="account_financial_report.report_general_ledger_ending_cumul"
  94. >
  95. <t
  96. t-set="account_or_partner_object"
  97. t-value="account"
  98. />
  99. <t t-set="type" t-value='"account_type"' />
  100. </t>
  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: 16.9%;">Ref -
  160. Label</div>
  161. <t t-if="show_cost_center">
  162. <!--## cost_center-->
  163. <div
  164. class="act_as_cell"
  165. style="width: 8.03%;"
  166. >Analytic Account</div>
  167. </t>
  168. <t t-if="show_analytic_tags">
  169. <!--## analytic tags-->
  170. <div class="act_as_cell" style="width: 4.75%;">Tags</div>
  171. </t>
  172. <!--## matching_number-->
  173. <div class="act_as_cell" style="width: 2.41%;">Rec.</div>
  174. <!--## debit-->
  175. <div class="act_as_cell amount" style="width: 8.02%;">Debit</div>
  176. <!--## credit-->
  177. <div class="act_as_cell amount" style="width: 8.02%;">Credit</div>
  178. <!--## balance cumulated-->
  179. <div
  180. class="act_as_cell amount"
  181. style="width: 8.02%;"
  182. >Cumul. Bal.</div>
  183. <t t-if="foreign_currency">
  184. <!--## currency_name-->
  185. <div class="act_as_cell" style="width: 2.08%;">Cur.</div>
  186. <!--## amount_currency-->
  187. <div
  188. class="act_as_cell amount"
  189. style="width: 5.19%;"
  190. >Amount cur.</div>
  191. </t>
  192. </div>
  193. </div>
  194. <!-- Display first line with initial balance -->
  195. <div class="act_as_row lines">
  196. <!--## date-->
  197. <div class="act_as_cell" />
  198. <!--## move-->
  199. <div class="act_as_cell" />
  200. <!--## journal-->
  201. <div class="act_as_cell" />
  202. <!--## account code-->
  203. <div class="act_as_cell" />
  204. <!--## taxes-->
  205. <div class="act_as_cell" />
  206. <!--## partner-->
  207. <div class="act_as_cell" />
  208. <!--## ref - label-->
  209. <div class="act_as_cell amount">Initial balance</div>
  210. <t t-if="show_cost_center">
  211. <!--## cost_center-->
  212. <div class="act_as_cell" />
  213. </t>
  214. <t t-if="show_analytic_tags">
  215. <!--## analytic tags-->
  216. <div class="act_as_cell" />
  217. </t>
  218. <!--## matching_number-->
  219. <div class="act_as_cell" />
  220. <!--## debit-->
  221. <div class="act_as_cell amount">
  222. <t t-if="type == 'account_type'">
  223. <t
  224. t-set="domain"
  225. t-value="[('account_id', '=', account['id']),
  226. ('date', '&lt;', date_from),
  227. ('debit', '&lt;&gt;', 0)]"
  228. />
  229. <span>
  230. <a
  231. t-att-data-domain="domain"
  232. t-att-data-res-model="'account.move.line'"
  233. class="o_account_financial_reports_web_action_monetary_multi"
  234. style="color: black;"
  235. >
  236. <t
  237. t-raw="account_or_partner_object['init_bal']['debit']"
  238. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  239. />
  240. </a>
  241. </span>
  242. </t>
  243. <t t-if="type == 'partner_type'">
  244. <t
  245. t-set="domain"
  246. t-value="[('account_id', '=', account['id']),
  247. ('partner_id', '=', partner['id']),
  248. ('date', '&lt;', date_from),
  249. ('debit', '&lt;&gt;', 0)]"
  250. />
  251. <span>
  252. <a
  253. t-att-data-domain="domain"
  254. t-att-data-res-model="'account.move.line'"
  255. class="o_account_financial_reports_web_action_monetary_multi"
  256. style="color: black;"
  257. >
  258. <t
  259. t-raw="account_or_partner_object['init_bal']['debit']"
  260. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  261. />
  262. </a>
  263. </span>
  264. </t>
  265. </div>
  266. <!--## credit-->
  267. <div class="act_as_cell amount">
  268. <t t-if="type == 'account_type'">
  269. <t
  270. t-set="domain"
  271. t-value="[('account_id', '=', account['id']),
  272. ('date', '&lt;', date_from),
  273. ('credit', '&lt;&gt;', 0)]"
  274. />
  275. <span>
  276. <a
  277. t-att-data-domain="domain"
  278. t-att-data-res-model="'account.move.line'"
  279. class="o_account_financial_reports_web_action_monetary_multi"
  280. style="color: black;"
  281. >
  282. <t
  283. t-raw="account_or_partner_object['init_bal']['credit']"
  284. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  285. />
  286. </a>
  287. </span>
  288. </t>
  289. <t t-if="type == 'partner_type'">
  290. <t
  291. t-set="domain"
  292. t-value="[('account_id', '=', account['id']),
  293. ('partner_id', '=', partner['id']),
  294. ('date', '&lt;', date_from),
  295. ('credit', '&lt;&gt;', 0)]"
  296. />
  297. <span>
  298. <a
  299. t-att-data-domain="domain"
  300. t-att-data-res-model="'account.move.line'"
  301. class="o_account_financial_reports_web_action_monetary_multi"
  302. style="color: black;"
  303. >
  304. <t
  305. t-raw="account_or_partner_object['init_bal']['credit']"
  306. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  307. />
  308. </a>
  309. </span>
  310. </t>
  311. </div>
  312. <!--## balance cumulated-->
  313. <div class="act_as_cell amount">
  314. <t t-if="type == 'account_type'">
  315. <t
  316. t-set="domain"
  317. t-value="[('account_id', '=', account['id']),
  318. ('date', '&lt;', date_from)]"
  319. />
  320. <span>
  321. <a
  322. t-att-data-domain="domain"
  323. t-att-data-res-model="'account.move.line'"
  324. class="o_account_financial_reports_web_action_monetary_multi"
  325. style="color: black;"
  326. >
  327. <t
  328. t-raw="account_or_partner_object['init_bal']['balance']"
  329. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  330. />
  331. </a>
  332. </span>
  333. </t>
  334. <t t-if="type == 'partner_type'">
  335. <t
  336. t-set="domain"
  337. t-value="[('account_id', '=', account['id']),
  338. ('partner_id', '=', partner['id']),
  339. ('date', '&lt;', date_from)]"
  340. />
  341. <span>
  342. <a
  343. 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. style="color: black;"
  347. >
  348. <t
  349. t-raw="account_or_partner_object['init_bal']['balance']"
  350. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  351. />
  352. </a>
  353. </span>
  354. </t>
  355. </div>
  356. <t t-if="foreign_currency">
  357. <t
  358. t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  359. >
  360. <div class="act_as_cell amount" style="width: 2.08%;">
  361. <span
  362. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
  363. />
  364. </div>
  365. <div class="act_as_cell amount" style="width: 5.19%;">
  366. <t t-if="type == 'account_type'">
  367. <t
  368. t-set="domain"
  369. t-value="[('account_id', '=', account['id']),
  370. ('date', '&lt;', o.date_from)]"
  371. />
  372. <span>
  373. <a
  374. t-att-data-domain="domain"
  375. t-att-data-res-model="'account.move.line'"
  376. class="o_account_financial_reports_web_action_monetary_multi"
  377. style="color: black;"
  378. >
  379. <t
  380. t-raw="account_or_partner_object['init_bal']['bal_curr']"
  381. t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
  382. />
  383. </a>
  384. </span>
  385. </t>
  386. <t t-if="type == 'partner_type'">
  387. <t
  388. t-set="domain"
  389. t-value="[('account_id', '=', account['id']),
  390. ('partner_id', '=', partner['id']),
  391. ('date', '&lt;', o.date_from)]"
  392. />
  393. <span>
  394. <a
  395. t-att-data-domain="domain"
  396. t-att-data-res-model="'account.move.line'"
  397. class="o_account_financial_reports_web_action_monetary_multi"
  398. style="color: black;"
  399. >
  400. <t
  401. t-raw="account_or_partner_object['init_bal']['bal_curr']"
  402. t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
  403. />
  404. </a>
  405. </span>
  406. </t>
  407. </div>
  408. </t>
  409. <t
  410. t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  411. >
  412. <div class="act_as_cell" style="width: 2.08%;" />
  413. <div class="act_as_cell" style="width: 5.19%;" />
  414. </t>
  415. </t>
  416. </div>
  417. <!-- Display each lines -->
  418. <t t-foreach="account_or_partner_object['move_lines']" t-as="line">
  419. <!-- # lines or centralized lines -->
  420. <div class="act_as_row lines">
  421. <!--## date-->
  422. <div class="act_as_cell left">
  423. <t t-set="res_model" t-value="'account.move.line'" />
  424. <span>
  425. <t t-if="line['id']">
  426. <a
  427. t-att-data-active-id="line['id']"
  428. t-att-data-res-model="res_model"
  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. <t t-if="not line['id']">
  440. <a
  441. class="o_account_financial_reports_web_action"
  442. style="color: black;"
  443. >
  444. <!--## We don't use t-field because it throws an error on click -->
  445. <t
  446. t-esc="line['date']"
  447. t-options="{'widget': 'date'}"
  448. />
  449. </a>
  450. </t>
  451. </span>
  452. </div>
  453. <!--## move-->
  454. <div class="act_as_cell left">
  455. <t t-set="res_model" t-value="'account.move'" />
  456. <t t-if="line['entry_id']">
  457. <span>
  458. <a
  459. t-att-data-active-id="line['entry_id']"
  460. t-att-data-res-model="res_model"
  461. class="o_account_financial_reports_web_action"
  462. style="color: black;"
  463. >
  464. <t t-raw="line['entry']" />
  465. </a>
  466. </span>
  467. </t>
  468. </div>
  469. <!--## journal-->
  470. <div class="act_as_cell left">
  471. <t t-set="res_model" t-value="'account.journal'" />
  472. <span>
  473. <a
  474. t-att-data-active-id="line['journal_id']"
  475. t-att-data-res-model="res_model"
  476. class="o_account_financial_reports_web_action"
  477. style="color: black;"
  478. >
  479. <t
  480. t-raw="o._get_atr_from_dict(line['journal_id'], journals_data, 'code')"
  481. />
  482. </a>
  483. </span>
  484. </div>
  485. <!--## account code-->
  486. <div class="act_as_cell left">
  487. <t t-set="res_model" t-value="'account.account'" />
  488. <span>
  489. <a
  490. t-att-data-active-id="account['id']"
  491. t-att-data-res-model="res_model"
  492. class="o_account_financial_reports_web_action"
  493. style="color: black;"
  494. >
  495. <t
  496. t-raw="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
  497. />
  498. </a>
  499. </span>
  500. </div>
  501. <!--## taxes-->
  502. <div class="act_as_cell left">
  503. <t t-if="taxes_data and line['tax_ids']">
  504. <t t-foreach="line['tax_ids']" t-as="tax_id">
  505. <span
  506. t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'tax_name')"
  507. />
  508. </t>
  509. </t>
  510. </div>
  511. <!--## partner-->
  512. <div class="act_as_cell left">
  513. <t t-set="res_model" t-value="'res.partner'" />
  514. <span t-if="line['partner_id']">
  515. <a
  516. t-att-data-active-id="line['partner_id']"
  517. t-att-data-res-model="res_model"
  518. class="o_account_financial_reports_web_action"
  519. style="color: black;"
  520. >
  521. <t t-raw="line['partner_name']" />
  522. </a>
  523. </span>
  524. </div>
  525. <!--## ref - label-->
  526. <div class="act_as_cell left">
  527. <t t-set="res_model" t-value="'account.move.line'" />
  528. <t t-if="line['id']">
  529. <span>
  530. <a
  531. t-att-data-active-id="line['id']"
  532. t-att-data-res-model="res_model"
  533. class="o_account_financial_reports_web_action"
  534. style="color: black;"
  535. >
  536. <t t-raw="line['ref_label']" />
  537. </a>
  538. </span>
  539. </t>
  540. <t t-if="not line['id']">
  541. <span>
  542. <a
  543. class="o_account_financial_reports_web_action"
  544. style="color: black;"
  545. >
  546. <t t-raw="line['ref_label']" />
  547. </a>
  548. </span>
  549. </t>
  550. </div>
  551. <!--## cost_center-->
  552. <t t-if="show_cost_center">
  553. <div class="act_as_cell left">
  554. <t t-set="res_model" t-value="'account.analytic.account'" />
  555. <span t-if="line['analytic_account_id']">
  556. <a
  557. t-att-data-active-id="line['analytic_account_id']"
  558. t-att-data-res-model="res_model"
  559. class="o_account_financial_reports_web_action"
  560. style="color: black;"
  561. >
  562. <t t-raw="line['analytic_account']" />
  563. </a>
  564. </span>
  565. </div>
  566. </t>
  567. <t t-if="show_analytic_tags">
  568. <!--## analytic tags-->
  569. <div class="act_as_cell left">
  570. <t t-if="line['tag_ids']">
  571. <t t-foreach="line['tag_ids']" t-as="tag_id">
  572. <span
  573. t-esc="o._get_atr_from_dict(tag_id, tags_data, 'name')"
  574. />
  575. </t>
  576. </t>
  577. </div>
  578. </t>
  579. <!--## matching_number-->
  580. <div class="act_as_cell">
  581. <t t-set="res_model" t-value="'account.full.reconcile'" />
  582. <span t-if="line['rec_id']">
  583. <a
  584. t-att-data-active-id="line['rec_id']"
  585. t-att-data-res-model="res_model"
  586. class="o_account_financial_reports_web_action"
  587. style="color: black;"
  588. >
  589. <t t-raw="line['rec_name']" />
  590. </a>
  591. </span>
  592. </div>
  593. <!--## debit-->
  594. <div class="act_as_cell amount">
  595. <t t-set="res_model" t-value="'account.move.line'" />
  596. <t t-if="line['id']">
  597. <span>
  598. <a
  599. t-att-data-active-id="line['id']"
  600. t-att-data-res-model="res_model"
  601. class="o_account_financial_reports_web_action_monetary"
  602. style="color: black;"
  603. >
  604. <t
  605. t-raw="line['debit']"
  606. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  607. />
  608. </a>
  609. </span>
  610. </t>
  611. <t t-if="not line['id']">
  612. <span>
  613. <a
  614. class="o_account_financial_reports_web_action_monetary"
  615. style="color: black;"
  616. >
  617. <t
  618. t-raw="line['debit']"
  619. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  620. />
  621. </a>
  622. </span>
  623. </t>
  624. </div>
  625. <!--## credit-->
  626. <div class="act_as_cell amount">
  627. <t t-set="res_model" t-value="'account.move.line'" />
  628. <t t-if="line['id']">
  629. <span>
  630. <a
  631. t-att-data-active-id="line['id']"
  632. t-att-data-res-model="res_model"
  633. class="o_account_financial_reports_web_action_monetary"
  634. style="color: black;"
  635. >
  636. <t
  637. t-raw="line['credit']"
  638. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  639. />
  640. </a>
  641. </span>
  642. </t>
  643. <t t-if="not line['id']">
  644. <span>
  645. <a
  646. class="o_account_financial_reports_web_action_monetary"
  647. style="color: black;"
  648. >
  649. <t
  650. t-raw="line['credit']"
  651. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  652. />
  653. </a>
  654. </span>
  655. </t>
  656. </div>
  657. <!--## balance cumulated-->
  658. <div class="act_as_cell amount">
  659. <t t-set="res_model" t-value="'account.move.line'" />
  660. <t t-if="line['id']">
  661. <span>
  662. <a
  663. t-att-data-active-id="line['id']"
  664. t-att-data-res-model="res_model"
  665. class="o_account_financial_reports_web_action_monetary"
  666. style="color: black;"
  667. >
  668. <t
  669. t-raw="line['balance']"
  670. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  671. />
  672. </a>
  673. </span>
  674. </t>
  675. <t t-if="not line['id']">
  676. <span>
  677. <a
  678. class="o_account_financial_reports_web_action_monetary"
  679. style="color: black;"
  680. >
  681. <t
  682. t-raw="line['balance']"
  683. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  684. />
  685. </a>
  686. </span>
  687. </t>
  688. </div>
  689. <t t-if="foreign_currency">
  690. <t t-if="line['currency_id']">
  691. <!--## currency_name-->
  692. <div class="act_as_cell amount" style="width: 2.08%;">
  693. <span t-esc="line['currency_id'][1]" />
  694. </div>
  695. <!--## amount_currency-->
  696. <div class="act_as_cell amount" style="width: 5.19%;">
  697. <t t-set="res_model" t-value="'account.move.line'" />
  698. <span>
  699. <a
  700. t-att-data-active-id="line['id']"
  701. t-att-data-res-model="res_model"
  702. class="o_account_financial_reports_web_action"
  703. style="color: black;"
  704. >
  705. <t t-raw="line['bal_curr']" />
  706. </a>
  707. </span>
  708. </div>
  709. </t>
  710. <t t-if="not line['currency_id']">
  711. <!--## currency_name-->
  712. <div class="act_as_cell amount" style="width: 2.08%;" />
  713. <!--## amount_currency-->
  714. <div class="act_as_cell amount" style="width: 5.19%;" />
  715. </t>
  716. </t>
  717. </div>
  718. </t>
  719. </div>
  720. </template>
  721. <template id="account_financial_report.report_general_ledger_ending_cumul">
  722. <!-- Display ending balance line for account or partner -->
  723. <div class="act_as_table list_table" style="width: 100%;">
  724. <div class="act_as_row labels" style="font-weight: bold;">
  725. <!--## date-->
  726. <t t-if='type == "account_type"'>
  727. <div class="act_as_cell first_column" style="width: 41.32%;"><span
  728. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
  729. /> - <span
  730. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
  731. /></div>
  732. <div
  733. class="act_as_cell right"
  734. style="width: 16.9%;"
  735. >Ending balance</div>
  736. </t>
  737. <t t-if='type == "partner_type"'>
  738. <div class="act_as_cell first_column" style="width: 41.32%;" />
  739. <div
  740. class="act_as_cell right"
  741. style="width: 16.9%;"
  742. >Partner ending balance</div>
  743. </t>
  744. <t t-if="show_cost_center">
  745. <!--## cost_center-->
  746. <div class="act_as_cell" style="width: 8.03%" />
  747. </t>
  748. <t t-if="show_analytic_tags">
  749. <!--## analytic tags-->
  750. <div class="act_as_cell" style="width: 4.75%;" />
  751. </t>
  752. <!--## matching_number-->
  753. <div class="act_as_cell" style="width: 2.41%;" />
  754. <!--## debit-->
  755. <div class="act_as_cell amount" style="width: 8.02%;">
  756. <span
  757. t-esc="account_or_partner_object['fin_bal']['debit']"
  758. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  759. />
  760. </div>
  761. <!--## credit-->
  762. <div class="act_as_cell amount" style="width: 8.02%;">
  763. <span
  764. t-esc="account_or_partner_object['fin_bal']['credit']"
  765. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  766. />
  767. </div>
  768. <!--## balance cumulated-->
  769. <div class="act_as_cell amount" style="width: 8.02%;">
  770. <span
  771. t-esc="account_or_partner_object['fin_bal']['balance']"
  772. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
  773. />
  774. </div>
  775. <!--## currency_name + amount_currency-->
  776. <t t-if="foreign_currency">
  777. <t
  778. t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  779. >
  780. <div class="act_as_cell amount" style="width: 2.08%;">
  781. <span
  782. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"
  783. />
  784. </div>
  785. <div class="act_as_cell amount" style="width: 5.19%;">
  786. <t t-if="type == 'account_type'">
  787. <t
  788. t-set="domain"
  789. t-value="[('account_id', '=', account['id']),
  790. ('date', '&lt;', date_from)]"
  791. />
  792. <span>
  793. <a
  794. t-att-data-domain="domain"
  795. t-att-data-res-model="'account.move.line'"
  796. class="o_account_financial_reports_web_action_monetary_multi"
  797. style="color: black;"
  798. >
  799. <t
  800. t-raw="account_or_partner_object['fin_bal']['bal_curr']"
  801. t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
  802. />
  803. </a>
  804. </span>
  805. </t>
  806. <t t-if="type == 'partner_type'">
  807. <t
  808. t-set="domain"
  809. t-value="[('account_id', '=', account['id']),
  810. ('partner_id', '=', partner['id']),
  811. ('date', '&lt;', date_from)]"
  812. />
  813. <span>
  814. <a
  815. t-att-data-domain="domain"
  816. t-att-data-res-model="'account.move.line'"
  817. class="o_account_financial_reports_web_action_monetary_multi"
  818. style="color: black;"
  819. >
  820. <t
  821. t-raw="account_or_partner_object['fin_bal']['bal_curr']"
  822. t-options="{'widget': 'monetary', 'display_currency': o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')}"
  823. />
  824. </a>
  825. </span>
  826. </t>
  827. </div>
  828. </t>
  829. <t
  830. t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')"
  831. >
  832. <div class="act_as_cell amount" style="width: 2.08%;" />
  833. <div class="act_as_cell amount" style="width: 5.19%;" />
  834. </t>
  835. </t>
  836. </div>
  837. </div>
  838. </template>
  839. </odoo>