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.

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