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.

491 lines
20 KiB

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