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.

625 lines
34 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="general_ledger">
  4. <t t-call="web.html_container">
  5. <t t-foreach="docs" t-as="o">
  6. <t t-call="account_financial_report.internal_layout">
  7. <t t-call="account_financial_report.report_general_ledger_base"/>
  8. </t>
  9. </t>
  10. </t>
  11. </template>
  12. <template id="report_general_ledger_base">
  13. <!-- Saved flag fields into variables, used to define columns display -->
  14. <t t-set="foreign_currency" t-value="foreign_currency"/>
  15. <!-- Defines global variables used by internal layout -->
  16. <t t-set="title">General Ledger - <t t-raw="company_name"/> - <t t-raw="currency_name"/></t>
  17. <div class="page">
  18. <div class="row">
  19. <h4 class="mt0" t-esc="title or 'Odoo Report'" style="text-align: center;"/>
  20. </div>
  21. <!-- Display filters -->
  22. <t t-call="account_financial_report.report_general_ledger_filters"/>
  23. <t t-foreach="general_ledger" t-as="account">
  24. <div class="page_break">
  25. <!-- Display account header -->
  26. <div class="act_as_table list_table" style="margin-top: 10px;"/>
  27. <div class="act_as_caption account_title"
  28. style="width: 100%">
  29. <span t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"/> -
  30. <span t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"/>
  31. </div>
  32. <t t-if="not account['partners']">
  33. <!-- Display account move lines without partner regroup -->
  34. <t t-set="type" t-value='"account_type"'/>
  35. <t t-call="account_financial_report.report_general_ledger_lines">
  36. <t t-set="account_or_partner_object" t-value="account"/>
  37. </t>
  38. </t>
  39. <t t-if="account['partners']">
  40. <!-- Display account partners -->
  41. <t t-if="not centralize">
  42. <t t-foreach="account['list_partner']" t-as="partner">
  43. <t t-set="type" t-value='"partner_type"'/>
  44. <div class="page_break">
  45. <!-- Display partner header -->
  46. <div class="act_as_caption account_title">
  47. <span
  48. t-esc="o._get_atr_from_dict(partner['id'], partners_data, 'name')"/>
  49. </div>
  50. <!-- Display partner move lines -->
  51. <t t-call="account_financial_report.report_general_ledger_lines">
  52. <t t-set="account_or_partner_object" t-value="partner"/>
  53. </t>
  54. <!-- Display partner footer -->
  55. <t t-call="account_financial_report.report_general_ledger_ending_cumul">
  56. <t t-set="account_or_partner_object" t-value="partner"/>
  57. <t t-set="type" t-value='"partner_type"'/>
  58. </t>
  59. </div>
  60. </t>
  61. </t>
  62. </t>
  63. <!-- Display account footer -->
  64. <t t-if="not account['partners']" t-call="account_financial_report.report_general_ledger_ending_cumul">
  65. <t t-set="account_or_partner_object" t-value="account"/>
  66. <t t-set="type" t-value='"account_type"'/>
  67. </t>
  68. </div>
  69. </t>
  70. </div>
  71. </template>
  72. <template id="account_financial_report.report_general_ledger_filters">
  73. <div class="act_as_table data_table" style="width: 100%;">
  74. <div class="act_as_row labels">
  75. <div class="act_as_cell">Date range filter</div>
  76. <div class="act_as_cell">Target moves filter</div>
  77. <div class="act_as_cell">Account balance at 0 filter</div>
  78. <div class="act_as_cell">Centralize filter</div>
  79. <div class="act_as_cell">Show analytic tags</div>
  80. </div>
  81. <div class="act_as_row">
  82. <div class="act_as_cell">
  83. From: <span t-esc="date_from"/> To: <span t-esc="date_to"/>
  84. </div>
  85. <div class="act_as_cell">
  86. <t t-if="only_posted_moves">All posted entries</t>
  87. <t t-if="not only_posted_moves">All entries</t>
  88. </div>
  89. <div class="act_as_cell">
  90. <t t-if="hide_account_at_0">Hide</t>
  91. <t t-if="not hide_account_at_0">Show</t>
  92. </div>
  93. <div class="act_as_cell">
  94. <t t-if="centralize">Yes</t>
  95. <t t-if="not centralize">No</t>
  96. </div>
  97. <div class="act_as_cell">
  98. <t t-if="show_analytic_tags">Yes</t>
  99. <t t-if="not show_analytic_tags">No</t>
  100. </div>
  101. </div>
  102. </div>
  103. </template>
  104. <template id="account_financial_report.report_general_ledger_lines">
  105. <div class="act_as_table data_table" style="width: 100%;">
  106. <!-- Display table headers for lines -->
  107. <div class="act_as_thead">
  108. <div class="act_as_row labels">
  109. <!--## date-->
  110. <div class="act_as_cell first_column" style="width: 3.51%;">
  111. Date</div>
  112. <!--## move-->
  113. <div class="act_as_cell" style="width: 8.03%">Entry</div>
  114. <!--## journal-->
  115. <div class="act_as_cell" style="width: 4.13%;">Journal</div>
  116. <!--## account code-->
  117. <div class="act_as_cell" style="width: 4.75%;">Account</div>
  118. <!--## account code-->
  119. <div class="act_as_cell" style="width: 8.89%;">Taxes</div>
  120. <!--## partner-->
  121. <div class="act_as_cell" style="width: 12.01%;">Partner
  122. </div>
  123. <!--## ref - label-->
  124. <div class="act_as_cell" style="width: 22.9%;">Ref -
  125. Label</div>
  126. <t t-if="show_cost_center">
  127. <!--## cost_center-->
  128. <div class="act_as_cell" style="width: 8.03%;">Cost
  129. center</div>
  130. </t>
  131. <t t-if="show_analytic_tags">
  132. <!--## analytic tags-->
  133. <div class="act_as_cell" style="width: 4.75%;">Tags</div>
  134. </t>
  135. <!--## matching_number-->
  136. <div class="act_as_cell" style="width: 2.41%;">Rec.</div>
  137. <!--## debit-->
  138. <div class="act_as_cell amount" style="width: 6.02%;">Debit</div>
  139. <!--## credit-->
  140. <div class="act_as_cell amount" style="width: 6.02%;">Credit</div>
  141. <!--## balance cumulated-->
  142. <div class="act_as_cell amount" style="width: 6.02%;">Cumul. Bal.</div>
  143. <t t-if="foreign_currency">
  144. <!--## currency_name-->
  145. <div class="act_as_cell" style="width: 2.08%;">Cur.</div>
  146. <!--## amount_currency-->
  147. <div class="act_as_cell amount" style="width: 5.19%;">Amount cur.</div>
  148. </t>
  149. </div>
  150. </div>
  151. <!-- Display first line with initial balance -->
  152. <div class="act_as_row lines">
  153. <!--## date-->
  154. <div class="act_as_cell"/>
  155. <!--## move-->
  156. <div class="act_as_cell"/>
  157. <!--## journal-->
  158. <div class="act_as_cell"/>
  159. <!--## account code-->
  160. <div class="act_as_cell"/>
  161. <!--## taxes-->
  162. <div class="act_as_cell"/>
  163. <!--## partner-->
  164. <div class="act_as_cell"/>
  165. <!--## ref - label-->
  166. <div class="act_as_cell amount">Initial balance</div>
  167. <t t-if="show_cost_center">
  168. <!--## cost_center-->
  169. <div class="act_as_cell"/>
  170. </t>
  171. <t t-if="show_analytic_tags">
  172. <!--## analytic tags-->
  173. <div class="act_as_cell"></div>
  174. </t>
  175. <!--## matching_number-->
  176. <div class="act_as_cell"/>
  177. <!--## debit-->
  178. <div class="act_as_cell amount">
  179. <t t-if="type == 'account_type'">
  180. <t t-set="domain"
  181. t-value="[('account_id', '=', account['id']),
  182. ('date', '&lt;', date_from),
  183. ('debit', '&lt;&gt;', 0)]"/>
  184. <span>
  185. <a t-att-data-domain="domain"
  186. t-att-data-res-model="'account.move.line'"
  187. class="o_account_financial_reports_web_action_monetary_multi"
  188. style="color: black;">
  189. <t t-raw="account_or_partner_object['init_bal']['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  190. </span>
  191. </t>
  192. <t t-if="type == 'partner_type'">
  193. <t t-set="domain"
  194. t-value="[('account_id', '=', account['id']),
  195. ('partner_id', '=', partner['id']),
  196. ('date', '&lt;', date_from),
  197. ('debit', '&lt;&gt;', 0)]"/>
  198. <span>
  199. <a t-att-data-domain="domain"
  200. t-att-data-res-model="'account.move.line'"
  201. class="o_account_financial_reports_web_action_monetary_multi"
  202. style="color: black;">
  203. <t t-raw="account_or_partner_object['init_bal']['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  204. </span>
  205. </t>
  206. </div>
  207. <!--## credit-->
  208. <div class="act_as_cell amount">
  209. <t t-if="type == 'account_type'">
  210. <t t-set="domain"
  211. t-value="[('account_id', '=', account['id']),
  212. ('date', '&lt;', date_from),
  213. ('credit', '&lt;&gt;', 0)]"/>
  214. <span>
  215. <a t-att-data-domain="domain"
  216. t-att-data-res-model="'account.move.line'"
  217. class="o_account_financial_reports_web_action_monetary_multi"
  218. style="color: black;">
  219. <t
  220. t-raw="account_or_partner_object['init_bal']['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  221. </span>
  222. </t>
  223. <t t-if="type == 'partner_type'">
  224. <t t-set="domain"
  225. t-value="[('account_id', '=', account['id']),
  226. ('partner_id', '=', partner['id']),
  227. ('date', '&lt;', date_from),
  228. ('credit', '&lt;&gt;', 0)]"/>
  229. <span>
  230. <a t-att-data-domain="domain"
  231. t-att-data-res-model="'account.move.line'"
  232. class="o_account_financial_reports_web_action_monetary_multi"
  233. style="color: black;">
  234. <t
  235. t-raw="account_or_partner_object['init_bal']['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  236. </span>
  237. </t>
  238. </div>
  239. <!--## balance cumulated-->
  240. <div class="act_as_cell amount">
  241. <t t-if="type == 'account_type'">
  242. <t t-set="domain"
  243. t-value="[('account_id', '=', account['id']),
  244. ('date', '&lt;', date_from)]"/>
  245. <span>
  246. <a t-att-data-domain="domain"
  247. t-att-data-res-model="'account.move.line'"
  248. class="o_account_financial_reports_web_action_monetary_multi"
  249. style="color: black;">
  250. <t
  251. t-raw="account_or_partner_object['init_bal']['balance']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  252. </span>
  253. </t>
  254. <t t-if="type == 'partner_type'">
  255. <t t-set="domain"
  256. t-value="[('account_id', '=', account['id']),
  257. ('partner_id', '=', partner['id']),
  258. ('date', '&lt;', date_from)]"/>
  259. <span>
  260. <a t-att-data-domain="domain"
  261. t-att-data-res-model="'account.move.line'"
  262. class="o_account_financial_reports_web_action_monetary_multi"
  263. style="color: black;">
  264. <t t-raw="account_or_partner_object['init_bal']['balance']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  265. </span>
  266. </t>
  267. </div>
  268. <t t-if="foreign_currency">
  269. <t t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')">
  270. <div class="act_as_cell amount" style="width: 2.08%;">
  271. <span t-field="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"/>
  272. </div>
  273. <div class="act_as_cell amount" style="width: 5.19%;">
  274. <t t-if="type == 'account_type'">
  275. <t t-set="domain"
  276. t-value="[('account_id', '=', account['id']),
  277. ('date', '&lt;', o.date_from)]"/>
  278. <span>
  279. <a t-att-data-domain="domain"
  280. t-att-data-res-model="'account.move.line'"
  281. class="o_account_financial_reports_web_action_monetary_multi"
  282. style="color: black;">
  283. <t
  284. t-raw="account_or_partner_object['init_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"/></a>
  285. </span>
  286. </t>
  287. <t t-if="type == 'partner_type'">
  288. <t t-set="domain"
  289. t-value="[('account_id', '=', account['id']),
  290. ('partner_id', '=', partner['id']),
  291. ('date', '&lt;', o.date_from)]"/>
  292. <span>
  293. <a t-att-data-domain="domain"
  294. t-att-data-res-model="'account.move.line'"
  295. class="o_account_financial_reports_web_action_monetary_multi"
  296. style="color: black;">
  297. <t t-raw="account_or_partner_object['init_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account.account_id.currency_id}"/></a>
  298. </span>
  299. </t>
  300. </div>
  301. </t>
  302. <t t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')">
  303. <div class="act_as_cell" style="width: 2.08%;"/>
  304. <div class="act_as_cell" style="width: 5.19%;"/>
  305. </t>
  306. </t>
  307. </div>
  308. <!-- Display each lines -->
  309. <t t-foreach="account_or_partner_object['move_lines']" t-as="line">
  310. <!-- # lines or centralized lines -->
  311. <div class="act_as_row lines">
  312. <!--## date-->
  313. <div class="act_as_cell left">
  314. <t t-set="res_model" t-value="'account.move.line'"/>
  315. <span>
  316. <t t-if="line['id']">
  317. <a t-att-data-active-id="line['id']"
  318. t-att-data-res-model="res_model"
  319. class="o_account_financial_reports_web_action"
  320. style="color: black;">
  321. <!--## We don't use t-field because it throws an error on click -->
  322. <t t-esc="line['date']" t-options="{'widget': 'date'}"/></a>
  323. </t>
  324. <t t-if="not line['id']">
  325. <a class="o_account_financial_reports_web_action"
  326. style="color: black;">
  327. <!--## We don't use t-field because it throws an error on click -->
  328. <t t-esc="line['date']" t-options="{'widget': 'date'}"/></a>
  329. </t>
  330. </span>
  331. </div>
  332. <!--## move-->
  333. <div class="act_as_cell left">
  334. <t t-set="res_model" t-value="'account.move'"/>
  335. <t t-if="line['entry_id']">
  336. <span>
  337. <a t-att-data-active-id="line['entry_id']"
  338. t-att-data-res-model="res_model"
  339. class="o_account_financial_reports_web_action"
  340. style="color: black;">
  341. <t t-raw="line['entry']"/></a>
  342. </span>
  343. </t>
  344. </div>
  345. <!--## journal-->
  346. <div class="act_as_cell left">
  347. <t t-set="res_model" t-value="'account.journal'"/>
  348. <span>
  349. <a t-att-data-active-id="line['journal_id']"
  350. t-att-data-res-model="res_model"
  351. class="o_account_financial_reports_web_action"
  352. style="color: black;">
  353. <t t-raw="o._get_atr_from_dict(line['journal_id'], journals_data, 'code')"/></a>
  354. </span>
  355. </div>
  356. <!--## account code-->
  357. <div class="act_as_cell left">
  358. <t t-set="res_model" t-value="'account.account'"/>
  359. <span>
  360. <a t-att-data-active-id="account['id']"
  361. t-att-data-res-model="res_model"
  362. class="o_account_financial_reports_web_action"
  363. style="color: black;">
  364. <t t-raw="o._get_atr_from_dict(account['id'], accounts_data, 'code')"/></a>
  365. </span>
  366. </div>
  367. <!--## taxes-->
  368. <div class="act_as_cell left">
  369. <t t-if="taxes_data and line['tax_ids']">
  370. <t t-foreach="line['tax_ids']" t-as="tax_id">
  371. <span t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'amount')"/> <span t-esc="o._get_atr_from_dict(tax_id, taxes_data, 'string')"/>
  372. </t>
  373. </t>
  374. </div>
  375. <!--## partner-->
  376. <div class="act_as_cell left">
  377. <t t-set="res_model" t-value="'res.partner'"/>
  378. <span t-if="line['partner_id']">
  379. <a t-att-data-active-id="line['partner_id']"
  380. t-att-data-res-model="res_model"
  381. class="o_account_financial_reports_web_action"
  382. style="color: black;"><t
  383. t-raw="line['partner_name']"/></a>
  384. </span>
  385. </div>
  386. <!--## ref - label-->
  387. <div class="act_as_cell left">
  388. <t t-set="res_model" t-value="'account.move.line'"/>
  389. <t t-if="line['id']">
  390. <span>
  391. <a t-att-data-active-id="line['id']"
  392. t-att-data-res-model="res_model"
  393. class="o_account_financial_reports_web_action"
  394. style="color: black;">
  395. <t t-raw="line['ref']"/></a>
  396. </span>
  397. </t>
  398. <t t-if="not line['id']">
  399. <span>
  400. <a class="o_account_financial_reports_web_action"
  401. style="color: black;">
  402. <t t-raw="line['ref']"/></a>
  403. </span>
  404. </t>
  405. </div>
  406. <!--## cost_center-->
  407. <t t-if="show_cost_center">
  408. <div class="act_as_cell left">
  409. <t t-set="res_model" t-value="'account.analytic.account'"/>
  410. <span t-if="line.cost_center">
  411. <a t-att-data-active-id="line.move_line_id.analytic_account_id.id"
  412. t-att-data-res-model="res_model"
  413. class="o_account_financial_reports_web_action"
  414. style="color: black;"><t t-raw="line.cost_center"/></a>
  415. </span>
  416. </div>
  417. </t>
  418. <t t-if="show_analytic_tags">
  419. <!--## analytic tags-->
  420. <div class="act_as_cell left">
  421. <t t-if="line['tag_ids']">
  422. <t t-foreach="line['tag_ids']" t-as="tag_id">
  423. <span t-esc="o._get_atr_from_dict(tag_id, tags_data, 'name')"/>
  424. </t>
  425. </t>
  426. </div>
  427. </t>
  428. <!--## matching_number-->
  429. <div class="act_as_cell">
  430. <t t-set="res_model" t-value="'account.full.reconcile'"/>
  431. <span t-if="line['rec_id']">
  432. <a t-att-data-active-id="line['rec_id']"
  433. t-att-data-res-model="res_model"
  434. class="o_account_financial_reports_web_action"
  435. style="color: black;"><t t-raw="line['rec_name']"/></a>
  436. </span>
  437. </div>
  438. <!--## debit-->
  439. <div class="act_as_cell amount">
  440. <t t-set="res_model" t-value="'account.move.line'"/>
  441. <t t-if="line['id']">
  442. <span>
  443. <a t-att-data-active-id="line['id']"
  444. t-att-data-res-model="res_model"
  445. class="o_account_financial_reports_web_action_monetary"
  446. style="color: black;">
  447. <t t-raw="line['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  448. </span>
  449. </t>
  450. <t t-if="not line['id']">
  451. <span>
  452. <a class="o_account_financial_reports_web_action_monetary"
  453. style="color: black;">
  454. <t t-raw="line['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  455. </span>
  456. </t>
  457. </div>
  458. <!--## credit-->
  459. <div class="act_as_cell amount">
  460. <t t-set="res_model" t-value="'account.move.line'"/>
  461. <t t-if="line['id']">
  462. <span>
  463. <a t-att-data-active-id="line['id']"
  464. t-att-data-res-model="res_model"
  465. class="o_account_financial_reports_web_action_monetary"
  466. style="color: black;">
  467. <t t-raw="line['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  468. </span>
  469. </t>
  470. <t t-if="not line['id']">
  471. <span>
  472. <a class="o_account_financial_reports_web_action_monetary"
  473. style="color: black;">
  474. <t t-raw="line['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  475. </span>
  476. </t>
  477. </div>
  478. <!--## balance cumulated-->
  479. <div class="act_as_cell amount">
  480. <t t-set="res_model" t-value="'account.move.line'"/>
  481. <t t-if="line['id']">
  482. <span>
  483. <a t-att-data-active-id="line['id']"
  484. t-att-data-res-model="res_model"
  485. class="o_account_financial_reports_web_action_monetary"
  486. style="color: black;">
  487. <t t-raw="line['balance']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  488. </span>
  489. </t>
  490. <t t-if="not line['id']">
  491. <span>
  492. <a class="o_account_financial_reports_web_action_monetary"
  493. style="color: black;">
  494. <t t-raw="line['balance']"
  495. t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
  496. </span>
  497. </t>
  498. </div>
  499. <t t-if="foreign_currency">
  500. <t t-if="line['currency_id']">
  501. <!--## currency_name-->
  502. <div class="act_as_cell amount" style="width: 2.08%;">
  503. <span t-esc="line['currency_id'][1]"/>
  504. </div>
  505. <!--## amount_currency-->
  506. <div class="act_as_cell amount" style="width: 5.19%;">
  507. <t t-set="res_model" t-value="'account.move.line'"/>
  508. <span>
  509. <a t-att-data-active-id="line['id']"
  510. t-att-data-res-model="res_model"
  511. class="o_account_financial_reports_web_action"
  512. style="color: black;">
  513. <t t-raw="line['bal_curr']"/></a>
  514. </span>
  515. </div>
  516. </t>
  517. <t t-if="not line['currency_id']">
  518. <!--## currency_name-->
  519. <div class="act_as_cell amount" style="width: 2.08%;"/>
  520. <!--## amount_currency-->
  521. <div class="act_as_cell amount" style="width: 5.19%;"/>
  522. </t>
  523. </t>
  524. </div>
  525. </t>
  526. </div>
  527. </template>
  528. <template id="account_financial_report.report_general_ledger_ending_cumul">
  529. <!-- Display ending balance line for account or partner -->
  530. <div class="act_as_table list_table" style="width: 100%;">
  531. <div class="act_as_row labels" style="font-weight: bold;">
  532. <!--## date-->
  533. <t t-if='type == "account_type"'>
  534. <div class="act_as_cell first_column"
  535. style="width: 41.32%;"><span
  536. t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"/> - <span t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"/></div>
  537. <div class="act_as_cell right"
  538. style="width: 22.9%;">Ending balance</div>
  539. </t>
  540. <t t-if='type == "partner_type"'>
  541. <div class="act_as_cell first_column" style="width: 41.32%;"/>
  542. <div class="act_as_cell right" style="width: 22.9%;">Partner ending balance</div>
  543. </t>
  544. <t t-if="show_cost_center">
  545. <!--## cost_center-->
  546. <div class="act_as_cell" style="width: 8.03%"/>
  547. </t>
  548. <t t-if="show_analytic_tags">
  549. <!--## analytic tags-->
  550. <div class="act_as_cell" style="width: 4.75%;"></div>
  551. </t>
  552. <!--## matching_number-->
  553. <div class="act_as_cell" style="width: 2.41%;"/>
  554. <!--## debit-->
  555. <div class="act_as_cell amount" style="width: 6.02%;">
  556. <span
  557. t-esc="account_or_partner_object['fin_bal']['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  558. </div>
  559. <!--## credit-->
  560. <div class="act_as_cell amount" style="width: 6.02%;">
  561. <span
  562. t-esc="account_or_partner_object['fin_bal']['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  563. </div>
  564. <!--## balance cumulated-->
  565. <div class="act_as_cell amount" style="width: 6.02%;">
  566. <span t-esc="account_or_partner_object['fin_bal']['balance']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
  567. </div>
  568. <!--## currency_name + amount_currency-->
  569. <t t-if="foreign_currency">
  570. <t t-if="o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')">
  571. <div class="act_as_cell amount" style="width: 2.08%;">
  572. <span t-field="o._get_atr_from_dict(account['id'], accounts_data, 'currency_name')"/>
  573. </div>
  574. <div class="act_as_cell amount" style="width: 5.19%;">
  575. <t t-if="type == 'account_type'">
  576. <t t-set="domain"
  577. t-value="[('account_id', '=', account['id']),
  578. ('date', '&lt;', date_from)]"/>
  579. <span>
  580. <a t-att-data-domain="domain"
  581. t-att-data-res-model="'account.move.line'"
  582. class="o_account_financial_reports_web_action_monetary_multi"
  583. style="color: black;">
  584. <t
  585. t-raw="account_or_partner_object['fin_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.account_id.currency_id}"/></a>
  586. </span>
  587. </t>
  588. <t t-if="type == 'partner_type'">
  589. <t t-set="domain" t-value="[('account_id', '=', account['id']),
  590. ('partner_id', '=', partner['id']),
  591. ('date', '&lt;', date_from)]"/>
  592. <span>
  593. <a t-att-data-domain="domain"
  594. t-att-data-res-model="'account.move.line'"
  595. class="o_account_financial_reports_web_action_monetary_multi"
  596. style="color: black;">
  597. <t t-raw="account_or_partner_object['fin_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account_or_partner_object.report_account_id.currency_id}"/></a>
  598. </span>
  599. </t>
  600. </div>
  601. </t>
  602. <t t-if="not o._get_atr_from_dict(account['id'], accounts_data, 'currency_id')">
  603. <div class="act_as_cell amount" style="width: 2.08%;"/>
  604. <div class="act_as_cell amount" style="width: 5.19%;"/>
  605. </t>
  606. </t>
  607. </div>
  608. </div>
  609. </template>
  610. </odoo>