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.

883 lines
47 KiB

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