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.

518 lines
21 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- Copyright 2018 ForgeFlow S.L.
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <template id="journal_ledger">
  6. <t t-call="web.html_container">
  7. <t t-foreach="docs" t-as="o">
  8. <t t-call="account_financial_report.internal_layout">
  9. <t t-call="account_financial_report.report_journal_ledger_base" />
  10. </t>
  11. </t>
  12. </t>
  13. </template>
  14. <template id="report_journal_ledger_base">
  15. <t t-set="with_auto_sequence" t-value="with_auto_sequence" />
  16. <t t-set="display_currency" t-value="foreign_currency" />
  17. <t t-set="display_account_name" t-value="with_account_name" />
  18. <t t-set="title">Journal Ledger - <t t-raw="company_name" /> - <t
  19. t-raw="currency_name"
  20. /></t>
  21. <t t-set="company_name" t-value="Company_Name" />
  22. <div class="page">
  23. <div class="row">
  24. <h4
  25. class="mt0"
  26. t-esc="title or 'Odoo Report'"
  27. style="text-align: center;"
  28. />
  29. </div>
  30. <t t-if="group_option == 'none'">
  31. <div class="page_break">
  32. <t t-call="account_financial_report.report_journal_all" />
  33. <br />
  34. <t t-call="account_financial_report.report_journal_all_taxes" />
  35. </div>
  36. </t>
  37. <t t-if="group_option == 'journal'">
  38. <t t-foreach="Journal_Ledgers" t-as="journal">
  39. <div class="page_break">
  40. <t
  41. t-call="account_financial_report.report_journal_ledger_journal"
  42. />
  43. <br />
  44. <t
  45. t-call="account_financial_report.report_journal_ledger_journal_taxes"
  46. />
  47. <br />
  48. </div>
  49. </t>
  50. </t>
  51. </div>
  52. </template>
  53. <template id="account_financial_report.report_journal_all">
  54. <div class="act_as_table list_table" style="margin-top: 10px;" />
  55. <div class="act_as_table data_table" style="width: 100%;">
  56. <t
  57. t-call="account_financial_report.report_journal_ledger_journal_table_header"
  58. />
  59. <t t-foreach="Moves" t-as="move">
  60. <t t-call="account_financial_report.report_journal_move" />
  61. </t>
  62. </div>
  63. </template>
  64. <template id="account_financial_report.report_journal_ledger_journal">
  65. <div class="act_as_table list_table" style="margin-top: 10px;" />
  66. <div class="act_as_caption account_title" style="width: 100%;">
  67. <span t-esc="journal['name']" /> (<span
  68. t-esc="journal['currency_name']"
  69. />) - <span t-esc="date_from" t-options="{'widget': 'date'}" /> to <span
  70. t-esc="date_to"
  71. t-options="{'widget': 'date'}"
  72. /> - <span t-esc="move_target" /> Moves
  73. </div>
  74. <div class="act_as_table data_table" style="width: 100%;">
  75. <t
  76. t-call="account_financial_report.report_journal_ledger_journal_table_header"
  77. />
  78. <t
  79. t-call="account_financial_report.report_journal_ledger_journal_first_line"
  80. />
  81. <t t-foreach="journal['report_moves']" t-as="move">
  82. <t t-call="account_financial_report.report_journal_move" />
  83. </t>
  84. </div>
  85. </template>
  86. <template id="account_financial_report.report_journal_ledger_journal_table_header">
  87. <t t-if="not display_account_name">
  88. <t t-set="account_column_style">
  89. width: 8.11%;
  90. </t>
  91. <t t-if="not with_auto_sequence">
  92. <t t-set="label_column_style">
  93. width: 38.92%;
  94. </t>
  95. </t>
  96. <t t-else="">
  97. <t t-set="label_column_style">
  98. width: 31.35%;
  99. </t>
  100. </t>
  101. </t>
  102. <t t-else="">
  103. <t t-if="not with_auto_sequence">
  104. <t t-set="account_column_style">
  105. width: 23.78%;
  106. </t>
  107. </t>
  108. <t t-else="">
  109. <t t-set="account_column_style">
  110. width: 16.21%;
  111. </t>
  112. </t>
  113. <t t-set="label_column_style">
  114. width: 23.24%;
  115. </t>
  116. </t>
  117. <div class="act_as_thead">
  118. <div class="act_as_row labels">
  119. <t t-if="with_auto_sequence">
  120. <div
  121. class="act_as_cell first_column"
  122. name="entry"
  123. style="width: 7.57%;"
  124. >
  125. Sequence
  126. </div>
  127. </t>
  128. <div
  129. t-att-class="'act_as_cell' if with_auto_sequence else 'act_as_cell first_column'"
  130. class="act_as_cell"
  131. name="entry"
  132. style="width: 7.57%;"
  133. >
  134. Entry
  135. </div>
  136. <div class="act_as_cell" name="date" style="width: 5.41%;">
  137. Date
  138. </div>
  139. <div
  140. class="act_as_cell"
  141. name="account"
  142. t-att-style="account_column_style"
  143. >
  144. Account
  145. </div>
  146. <div class="act_as_cell" name="partner" style="width: 15.14%;">
  147. Partner
  148. </div>
  149. <div class="act_as_cell" name="label" t-att-style="label_column_style">
  150. Ref - Label
  151. </div>
  152. <div class="act_as_cell" name="taxes" style="width: 7.57%;">
  153. Taxes
  154. </div>
  155. <div class="act_as_cell" name="debit" style="width: 8.65%;">
  156. Debit
  157. </div>
  158. <div class="act_as_cell" name="credit" style="width: 8.65%;">
  159. Credit
  160. </div>
  161. <t t-if="display_currency">
  162. <div class="act_as_cell" name="currency_name" style="width: 2.16%;">
  163. Cur.
  164. </div>
  165. <div
  166. class="act_as_cell"
  167. name="amount_currency"
  168. style="width: 6.49%;"
  169. >
  170. Amount Cur.
  171. </div>
  172. </t>
  173. </div>
  174. </div>
  175. </template>
  176. <template id="account_financial_report.report_journal_ledger_journal_first_line">
  177. <div class="act_as_row lines">
  178. <div class="act_as_cell" name="Sequence" />
  179. <div class="act_as_cell" name="entry" />
  180. <div class="act_as_cell" name="date" />
  181. <div class="act_as_cell" name="account" />
  182. <div class="act_as_cell" name="partner" />
  183. <div class="act_as_cell" name="label" />
  184. <div class="act_as_cell" name="taxes" />
  185. <div class="act_as_cell amount" name="debit">
  186. <b>
  187. <span
  188. t-esc="journal['debit']"
  189. t-options="{'widget': 'float', 'precision': 2}"
  190. />
  191. </b>
  192. </div>
  193. <div class="act_as_cell amount" name="credit">
  194. <b>
  195. <span
  196. t-esc="journal['credit']"
  197. t-options="{'widget': 'float', 'precision': 2}"
  198. />
  199. </b>
  200. </div>
  201. <t t-if="display_currency">
  202. <div class="act_as_cell" name="currency_name">
  203. </div>
  204. <div class="act_as_cell amount" name="amount_currency">
  205. </div>
  206. </t>
  207. </div>
  208. <div style="width: 100%" />
  209. </template>
  210. <template id="account_financial_report.report_journal_move">
  211. <t t-set="display_move_info" t-value="True" />
  212. <t t-set="last_partner" t-eval="None" />
  213. <t t-set="display_partner" t-eval="True" />
  214. <t t-foreach="move['report_move_lines']" t-as="move_line">
  215. <div class="act_as_row lines">
  216. <t
  217. t-set="current_partner"
  218. t-value="o._get_partner_name(move_line['partner_id'], partner_ids_data)"
  219. />
  220. <t t-set="display_partner" t-value="current_partner != last_partner" />
  221. <t t-call="account_financial_report.report_journal_move_line" />
  222. <t t-set="last_partner" t-value="current_partner" />
  223. <t t-set="display_move_info" t-value="False" />
  224. </div>
  225. </t>
  226. </template>
  227. <template id="account_financial_report.report_journal_move_line">
  228. <div class="act_as_cell left" name="auto_sequence" t-if="with_auto_sequence">
  229. <span t-if="display_move_info" t-esc="move_line['auto_sequence']" />
  230. </div>
  231. <div class="act_as_cell left" name="entry">
  232. <t t-if="display_move_info">
  233. <span
  234. t-att-res-id="move_line['move_id']"
  235. res-model="account.move"
  236. view-type="form"
  237. >
  238. <t
  239. t-esc="o._get_atr_from_dict(move_line['move_id'], move_ids_data, 'entry')"
  240. />
  241. </span>
  242. </t>
  243. </div>
  244. <div class="act_as_cell left" name="date">
  245. <span
  246. t-if="display_move_info"
  247. t-esc="move_line['date']"
  248. t-options="{'widget': 'date'}"
  249. />
  250. </div>
  251. <div class="act_as_cell left" name="account">
  252. <span
  253. t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'code')"
  254. />
  255. <span t-if="display_account_name">
  256. - <span
  257. t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name')"
  258. />
  259. </span>
  260. </div>
  261. <div class="act_as_cell left" name="partner">
  262. <span
  263. t-if="display_partner"
  264. t-esc="o._get_partner_name(move_line['partner_id'], partner_ids_data)"
  265. />
  266. </div>
  267. <div class="act_as_cell left" name="label">
  268. <span t-if="move_line['label']" t-esc="move_line['label']" />
  269. <span t-if="not move_line['label']">/</span>
  270. </div>
  271. <div class="act_as_cell left" name="taxes">
  272. <t
  273. t-set="tax_line_dat"
  274. t-value="o._get_data_from_dict(move_line['tax_line_id'], tax_line_data)"
  275. />
  276. <t
  277. t-set="move_line_ids_taxes_dat"
  278. t-value="o._get_data_from_dict(move_line['move_line_id'], move_line_ids_taxes_data)"
  279. />
  280. <span
  281. t-esc="o._get_ml_tax_description(move_line, tax_line_dat, move_line_ids_taxes_dat)"
  282. />
  283. </div>
  284. <div class="act_as_cell amount" name="debit">
  285. <t t-if="move_line['debit']">
  286. <span
  287. t-esc="move_line['debit']"
  288. t-options="{'widget': 'float', 'precision': 2}"
  289. />
  290. </t>
  291. </div>
  292. <div class="act_as_cell amount" name="credit">
  293. <t t-if="move_line['credit']">
  294. <span
  295. t-esc="move_line['credit']"
  296. t-options="{'widget': 'float', 'precision': 2}"
  297. />
  298. </t>
  299. </div>
  300. <t t-if="display_currency">
  301. <div class="act_as_cell" name="currency_name">
  302. <t t-if="move_line['currency_id']">
  303. <span t-esc="currency_ids_data.get(move_line['currency_id'], '')" />
  304. </t>
  305. </div>
  306. <div class="act_as_cell amount" name="amount_currency">
  307. <t
  308. t-if="move_line['amount_currency']"
  309. t-options="{'widget': 'float', 'precision': 2}"
  310. >
  311. <span
  312. t-esc="move_line['amount_currency']"
  313. t-options="{'widget': 'float', 'precision': 2}"
  314. />
  315. </t>
  316. </div>
  317. </t>
  318. </template>
  319. <template id="account_financial_report.report_journal_ledger_journal_taxes">
  320. <b>Taxes summary</b>
  321. <div class="act_as_table data_table" style="width: 100%;">
  322. <div class="act_as_thead">
  323. <div class="act_as_row labels">
  324. <div
  325. class="act_as_cell first_column"
  326. name="name"
  327. style="width: 30.97%;"
  328. >
  329. Name
  330. </div>
  331. <div class="act_as_cell" name="description" style="width: 13.27%;">
  332. Description
  333. </div>
  334. <div class="act_as_cell" name="base_amount" style="width: 27.88%;">
  335. Base Amount
  336. </div>
  337. <div class="act_as_cell" name="tax_amount" style="width: 27.88%;">
  338. Tax Amount
  339. </div>
  340. </div>
  341. </div>
  342. </div>
  343. <div class="act_as_table data_table" style="width: 100%;">
  344. <div class="act_as_row labels">
  345. <div
  346. class="act_as_cell first_column"
  347. name="name"
  348. style="width: 30.97%;"
  349. />
  350. <div class="act_as_cell" name="description" style="width: 13.27%;" />
  351. <div class="act_as_cell" name="base_debit" style="width: 9.29%;">
  352. Debit
  353. </div>
  354. <div class="act_as_cell" name="base_credit" style="width: 9.29%;">
  355. Credit
  356. </div>
  357. <div class="act_as_cell" name="base_balance" style="width: 9.29%;">
  358. Balance
  359. </div>
  360. <div class="act_as_cell" name="tax_debit" style="width: 9.29%;">
  361. Debit
  362. </div>
  363. <div class="act_as_cell" name="tax_credit" style="width: 9.29%;">
  364. Credit
  365. </div>
  366. <div class="act_as_cell" name="tax_balance" style="width: 9.29%;">
  367. Balance
  368. </div>
  369. </div>
  370. <t t-foreach="journal['tax_lines']" t-as="tax_line">
  371. <div class="act_as_row lines">
  372. <div class="act_as_cell left" name="tax_name">
  373. <span t-esc="tax_line['tax_name']" />
  374. </div>
  375. <div class="act_as_cell left" name="tax_code">
  376. <span t-esc="tax_line['tax_code']" />
  377. </div>
  378. <div class="act_as_cell amount" name="base_debit">
  379. <span
  380. t-esc="tax_line['base_debit']"
  381. t-options="{'widget': 'float', 'precision': 2}"
  382. />
  383. </div>
  384. <div class="act_as_cell amount" name="base_credit">
  385. <span
  386. t-esc="tax_line['base_credit']"
  387. t-options="{'widget': 'float', 'precision': 2}"
  388. />
  389. </div>
  390. <div class="act_as_cell amount" name="base_balance">
  391. <span
  392. t-esc="tax_line['base_balance']"
  393. t-options="{'widget': 'float', 'precision': 2}"
  394. />
  395. </div>
  396. <div class="act_as_cell amount" name="tax_debit">
  397. <span
  398. t-esc="tax_line['tax_debit']"
  399. t-options="{'widget': 'float', 'precision': 2}"
  400. />
  401. </div>
  402. <div class="act_as_cell amount" name="tax_credit">
  403. <span
  404. t-esc="tax_line['tax_credit']"
  405. t-options="{'widget': 'float', 'precision': 2}"
  406. />
  407. </div>
  408. <div class="act_as_cell amount" name="tax_balance">
  409. <span
  410. t-esc="tax_line['tax_balance']"
  411. t-options="{'widget': 'float', 'precision': 2}"
  412. />
  413. </div>
  414. </div>
  415. </t>
  416. </div>
  417. </template>
  418. <template id="account_financial_report.report_journal_all_taxes">
  419. <b>Taxes summary</b>
  420. <div class="act_as_table data_table" style="width: 100%;">
  421. <div class="act_as_thead">
  422. <div class="act_as_row labels">
  423. <div
  424. class="act_as_cell first_column"
  425. name="name"
  426. style="width: 30.97%;"
  427. >
  428. Name
  429. </div>
  430. <div class="act_as_cell" name="description" style="width: 13.27%;">
  431. Description
  432. </div>
  433. <div class="act_as_cell" name="base_amount" style="width: 27.88%;">
  434. Base Amount
  435. </div>
  436. <div class="act_as_cell" name="tax_amount" style="width: 27.88%;">
  437. Tax Amount
  438. </div>
  439. </div>
  440. </div>
  441. </div>
  442. <div class="act_as_table data_table" style="width: 100%;">10
  443. <div class="act_as_row labels">
  444. <div
  445. class="act_as_cell first_column"
  446. name="name"
  447. style="width: 30.97%;"
  448. />
  449. <div class="act_as_cell" name="description" style="width: 13.27%;" />
  450. <div class="act_as_cell" name="base_debit" style="width: 9.29%;">
  451. Debit
  452. </div>
  453. <div class="act_as_cell" name="base_credit" style="width: 9.29%;">
  454. Credit
  455. </div>
  456. <div class="act_as_cell" name="base_balance" style="width: 9.29%;">
  457. Balance
  458. </div>
  459. <div class="act_as_cell" name="tax_debit" style="width: 9.29%;">
  460. Debit
  461. </div>
  462. <div class="act_as_cell" name="tax_credit" style="width: 9.29%;">
  463. Credit
  464. </div>
  465. <div class="act_as_cell" name="tax_balance" style="width: 9.29%;">
  466. Balance
  467. </div>
  468. </div>
  469. <t t-foreach="ReportTaxLines" t-as="tax_line">
  470. <div class="act_as_row lines">
  471. <div class="act_as_cell left" name="tax_name">
  472. <span t-esc="tax_line['tax_name']" />
  473. </div>
  474. <div class="act_as_cell left" name="tax_code">
  475. <span t-esc="tax_line['tax_code']" />
  476. </div>
  477. <div class="act_as_cell amount" name="base_debit">
  478. <span
  479. t-esc="tax_line['base_debit']"
  480. t-options="{'widget': 'float', 'precision': 2}"
  481. />
  482. </div>
  483. <div class="act_as_cell amount" name="base_credit">
  484. <span
  485. t-esc="tax_line['base_credit']"
  486. t-options="{'widget': 'float', 'precision': 2}"
  487. />
  488. </div>
  489. <div class="act_as_cell amount" name="base_balance">
  490. <span
  491. t-esc="tax_line['base_balance']"
  492. t-options="{'widget': 'float', 'precision': 2}"
  493. />
  494. </div>
  495. <div class="act_as_cell amount" name="tax_debit">
  496. <span
  497. t-esc="tax_line['tax_debit']"
  498. t-options="{'widget': 'float', 'precision': 2}"
  499. />
  500. </div>
  501. <div class="act_as_cell amount" name="tax_credit">
  502. <span
  503. t-esc="tax_line['tax_credit']"
  504. t-options="{'widget': 'float', 'precision': 2}"
  505. />
  506. </div>
  507. <div class="act_as_cell amount" name="tax_balance">
  508. <span
  509. t-esc="tax_line['tax_balance']"
  510. t-options="{'widget': 'float', 'precision': 2}"
  511. />
  512. </div>
  513. </div>
  514. </t>
  515. </div>
  516. </template>
  517. </odoo>