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.

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