odoo-addon-account-financial-report 17.0.1.6.1.1__py3-none-any.whl → 18.0.1.0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of odoo-addon-account-financial-report might be problematic. Click here for more details.

Files changed (77) hide show
  1. odoo/addons/account_financial_report/README.rst +15 -8
  2. odoo/addons/account_financial_report/__manifest__.py +3 -2
  3. odoo/addons/account_financial_report/i18n/account_financial_report.pot +1 -124
  4. odoo/addons/account_financial_report/i18n/ar.po +0 -28
  5. odoo/addons/account_financial_report/i18n/ca.po +0 -28
  6. odoo/addons/account_financial_report/i18n/de.po +0 -28
  7. odoo/addons/account_financial_report/i18n/es.po +0 -28
  8. odoo/addons/account_financial_report/i18n/es_AR.po +0 -28
  9. odoo/addons/account_financial_report/i18n/es_MX.po +0 -28
  10. odoo/addons/account_financial_report/i18n/fr.po +0 -28
  11. odoo/addons/account_financial_report/i18n/fr_CH.po +0 -28
  12. odoo/addons/account_financial_report/i18n/fr_FR.po +0 -28
  13. odoo/addons/account_financial_report/i18n/hr.po +0 -28
  14. odoo/addons/account_financial_report/i18n/hr_HR.po +0 -28
  15. odoo/addons/account_financial_report/i18n/it.po +1 -33
  16. odoo/addons/account_financial_report/i18n/ja.po +0 -28
  17. odoo/addons/account_financial_report/i18n/nl.po +0 -28
  18. odoo/addons/account_financial_report/i18n/nl_NL.po +0 -28
  19. odoo/addons/account_financial_report/i18n/pt.po +0 -28
  20. odoo/addons/account_financial_report/i18n/pt_BR.po +0 -28
  21. odoo/addons/account_financial_report/i18n/ro.po +0 -28
  22. odoo/addons/account_financial_report/i18n/sv.po +0 -28
  23. odoo/addons/account_financial_report/i18n/tr.po +0 -28
  24. odoo/addons/account_financial_report/models/account.py +1 -1
  25. odoo/addons/account_financial_report/models/account_age_report_configuration.py +6 -4
  26. odoo/addons/account_financial_report/models/account_group.py +3 -3
  27. odoo/addons/account_financial_report/readme/CONFIGURE.md +1 -1
  28. odoo/addons/account_financial_report/readme/CONTRIBUTORS.md +2 -1
  29. odoo/addons/account_financial_report/readme/CREDITS.md +1 -0
  30. odoo/addons/account_financial_report/report/__init__.py +3 -3
  31. odoo/addons/account_financial_report/report/abstract_report.py +3 -1
  32. odoo/addons/account_financial_report/report/abstract_report_xlsx.py +5 -5
  33. odoo/addons/account_financial_report/report/aged_partner_balance.py +16 -20
  34. odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +30 -30
  35. odoo/addons/account_financial_report/report/general_ledger.py +26 -14
  36. odoo/addons/account_financial_report/report/general_ledger_xlsx.py +3 -3
  37. odoo/addons/account_financial_report/report/journal_ledger.py +9 -9
  38. odoo/addons/account_financial_report/report/journal_ledger_xlsx.py +1 -1
  39. odoo/addons/account_financial_report/report/open_items.py +1 -1
  40. odoo/addons/account_financial_report/report/open_items_xlsx.py +1 -1
  41. odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml +29 -27
  42. odoo/addons/account_financial_report/report/templates/general_ledger.xml +2 -2
  43. odoo/addons/account_financial_report/report/templates/journal_ledger.xml +58 -66
  44. odoo/addons/account_financial_report/report/templates/layouts.xml +3 -9
  45. odoo/addons/account_financial_report/report/templates/trial_balance.xml +3 -5
  46. odoo/addons/account_financial_report/report/trial_balance.py +27 -30
  47. odoo/addons/account_financial_report/report/trial_balance_xlsx.py +1 -1
  48. odoo/addons/account_financial_report/report/vat_report.py +8 -4
  49. odoo/addons/account_financial_report/report/vat_report_xlsx.py +1 -1
  50. odoo/addons/account_financial_report/static/description/index.html +15 -8
  51. odoo/addons/account_financial_report/static/src/js/report.esm.js +1 -2
  52. odoo/addons/account_financial_report/static/src/js/report_action.esm.js +0 -1
  53. odoo/addons/account_financial_report/static/src/{css/report.css → scss/report.scss} +74 -42
  54. odoo/addons/account_financial_report/static/src/scss/report_html.scss +10 -0
  55. odoo/addons/account_financial_report/tests/__init__.py +1 -1
  56. odoo/addons/account_financial_report/tests/test_general_ledger.py +3 -3
  57. odoo/addons/account_financial_report/tests/test_journal_ledger.py +3 -4
  58. odoo/addons/account_financial_report/tests/test_open_items.py +2 -2
  59. odoo/addons/account_financial_report/tests/test_trial_balance.py +15 -8
  60. odoo/addons/account_financial_report/tests/test_vat_report.py +4 -5
  61. odoo/addons/account_financial_report/view/account_age_report_configuration_views.xml +6 -6
  62. odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +6 -4
  63. odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +5 -5
  64. odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +14 -14
  65. odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +8 -4
  66. odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +14 -14
  67. odoo/addons/account_financial_report/wizard/open_items_wizard.py +1 -1
  68. odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +14 -14
  69. odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +10 -8
  70. odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml +14 -14
  71. odoo/addons/account_financial_report/wizard/vat_report_wizard.py +2 -2
  72. odoo/addons/account_financial_report/wizard/vat_report_wizard_view.xml +14 -14
  73. {odoo_addon_account_financial_report-17.0.1.6.1.1.dist-info → odoo_addon_account_financial_report-18.0.1.0.0.2.dist-info}/METADATA +20 -13
  74. {odoo_addon_account_financial_report-17.0.1.6.1.1.dist-info → odoo_addon_account_financial_report-18.0.1.0.0.2.dist-info}/RECORD +76 -75
  75. odoo/addons/account_financial_report/static/src/css/report_html.css +0 -7
  76. {odoo_addon_account_financial_report-17.0.1.6.1.1.dist-info → odoo_addon_account_financial_report-18.0.1.0.0.2.dist-info}/WHEEL +0 -0
  77. {odoo_addon_account_financial_report-17.0.1.6.1.1.dist-info → odoo_addon_account_financial_report-18.0.1.0.0.2.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  # Author: Damien Crier
2
2
  # Author: Julien Coux
3
3
  # Copyright 2016 Camptocamp SA
4
- # Copyright 2021 Tecnativa - Jo??o Marques
4
+ # Copyright 2021 Tecnativa - João Marques
5
5
  # Copyright 2022 Tecnativa - V??ctor Mart??nez
6
6
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
7
7
 
@@ -203,7 +203,7 @@ class GeneralLedgerXslx(models.AbstractModel):
203
203
  )
204
204
  else:
205
205
  analytic_distribution += (
206
- "%s " % analytic_data[int(account_id)]["name"]
206
+ f"{analytic_data[int(account_id)]['name']} "
207
207
  )
208
208
  line.update(
209
209
  {
@@ -313,7 +313,7 @@ class GeneralLedgerXslx(models.AbstractModel):
313
313
  )
314
314
  else:
315
315
  analytic_distribution += (
316
- "%s " % analytic_data[int(account_id)]["name"]
316
+ f"{analytic_data[int(account_id)]['name']} "
317
317
  )
318
318
  line.update(
319
319
  {
@@ -93,9 +93,9 @@ class JournalLedgerReport(models.AbstractModel):
93
93
  return "move_id"
94
94
 
95
95
  def _get_move_lines_data(self, ml, wizard, ml_taxes, auto_sequence, exigible):
96
- base_debit = (
97
- base_credit
98
- ) = tax_debit = tax_credit = base_balance = tax_balance = 0.0
96
+ base_debit = base_credit = tax_debit = tax_credit = base_balance = (
97
+ tax_balance
98
+ ) = 0.0
99
99
  if exigible:
100
100
  base_debit = ml_taxes and ml.debit or 0.0
101
101
  base_credit = ml_taxes and ml.credit or 0.0
@@ -264,7 +264,9 @@ class JournalLedgerReport(models.AbstractModel):
264
264
  journal_id = ml_data["journal_id"]
265
265
  if journal_id not in journals_taxes_data.keys():
266
266
  journals_taxes_data[journal_id] = {}
267
- taxes = self.env["account.tax"].browse(tax_ids)
267
+ taxes = self.env["account.tax"].search_fetch(
268
+ [("id", "in", tax_ids)], ["name", "description"]
269
+ )
268
270
  for tax in taxes:
269
271
  if tax.id not in journals_taxes_data[journal_id]:
270
272
  journals_taxes_data[journal_id][tax.id] = {
@@ -312,11 +314,9 @@ class JournalLedgerReport(models.AbstractModel):
312
314
  if key not in journal_moves_data.keys():
313
315
  journal_moves_data[key] = []
314
316
  journal_moves_data[key] += list(items)
315
- move_lines_data = (
316
- account_ids_data
317
- ) = (
318
- partner_ids_data
319
- ) = currency_ids_data = tax_line_ids_data = move_line_ids_taxes_data = {}
317
+ move_lines_data = account_ids_data = partner_ids_data = currency_ids_data = (
318
+ tax_line_ids_data
319
+ ) = move_line_ids_taxes_data = {}
320
320
  if move_ids:
321
321
  move_lines = self._get_move_lines(move_ids, wizard, journal_ids)
322
322
  move_lines_data = move_lines[1]
@@ -1,7 +1,7 @@
1
1
  # Author: Damien Crier
2
2
  # Author: Julien Coux
3
3
  # Copyright 2016 Camptocamp SA
4
- # Copyright 2021 Tecnativa - Jo??o Marques
4
+ # Copyright 2021 Tecnativa - João Marques
5
5
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
6
6
 
7
7
  from odoo import _, models
@@ -1,4 +1,4 @@
1
- # ?? 2016 Julien Coux (Camptocamp)
1
+ # © 2016 Julien Coux (Camptocamp)
2
2
  # Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
3
3
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
4
 
@@ -1,6 +1,6 @@
1
1
  # Author: Julien Coux
2
2
  # Copyright 2016 Camptocamp SA
3
- # Copyright 2021 Tecnativa - Jo??o Marques
3
+ # Copyright 2021 Tecnativa - João Marques
4
4
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5
5
 
6
6
  from odoo import _, models
@@ -130,7 +130,9 @@
130
130
  </t>
131
131
  <!--## dynamic columns-->
132
132
  <t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
133
- <div class="act_as_cell"><span t-out="column_dynamic.name" /></div>
133
+ <div class="act_as_cell">
134
+ <span t-out="column_dynamic.name" />
135
+ </div>
134
136
  </t>
135
137
  </div>
136
138
  </div>
@@ -149,9 +151,9 @@
149
151
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
150
152
  />
151
153
  </div>
152
- <!--## current-->
154
+ <!--## current-->
153
155
  <div class="act_as_cell amount">
154
- <span
156
+ <span
155
157
  t-esc="partner['current']"
156
158
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
157
159
  />
@@ -357,26 +359,26 @@
357
359
  />
358
360
  </span>
359
361
  </div>
360
- <!--## current-->
361
- <div class="act_as_cell amount">
362
- <t t-if="line['current'] == 0">
363
- <span
362
+ <!--## current-->
363
+ <div class="act_as_cell amount">
364
+ <t t-if="line['current'] == 0">
365
+ <span
364
366
  t-esc="line['current']"
365
367
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
366
368
  />
367
- </t>
368
- <t t-else="">
369
- <span
369
+ </t>
370
+ <t t-else="">
371
+ <span
370
372
  domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
371
373
  res-model="account.move.line"
372
374
  >
373
- <t
375
+ <t
374
376
  t-out="line['current']"
375
377
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
376
378
  />
377
- </span>
378
- </t>
379
- </div>
379
+ </span>
380
+ </t>
381
+ </div>
380
382
  <t t-if="not age_partner_config">
381
383
  <!--## age_30_days-->
382
384
  <div class="act_as_cell amount">
@@ -522,13 +524,13 @@
522
524
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
523
525
  />
524
526
  </div>
525
- <!--## current-->
526
- <div class="act_as_cell amount" style="width: 6.00%;">
527
- <span
527
+ <!--## current-->
528
+ <div class="act_as_cell amount" style="width: 6.00%;">
529
+ <span
528
530
  t-esc="partner_cumul_line['current']"
529
531
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
530
532
  />
531
- </div>
533
+ </div>
532
534
  <t t-if="not age_partner_config">
533
535
  <!--## age_30_days-->
534
536
  <div class="act_as_cell amount" style="width: 6.00%;">
@@ -591,13 +593,13 @@
591
593
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
592
594
  />
593
595
  </div>
594
- <!--## current-->
595
- <div class="act_as_cell amount" style="width: 9.64%;">
596
- <span
596
+ <!--## current-->
597
+ <div class="act_as_cell amount" style="width: 9.64%;">
598
+ <span
597
599
  t-esc="account['current']"
598
600
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
599
601
  />
600
- </div>
602
+ </div>
601
603
  <t t-if="not age_partner_config">
602
604
  <!--## age_30_days-->
603
605
  <div class="act_as_cell amount" style="width: 9.64%;">
@@ -656,13 +658,13 @@
656
658
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
657
659
  />
658
660
  </div>
659
- <!--## current-->
660
- <div class="act_as_cell amount" style="width: 6.00%">
661
- <span
661
+ <!--## current-->
662
+ <div class="act_as_cell amount" style="width: 6.00%">
663
+ <span
662
664
  t-esc="account['current']"
663
665
  t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
664
666
  />
665
- </div>
667
+ </div>
666
668
  <t t-if="not age_partner_config">
667
669
  <!--## age_30_days-->
668
670
  <div class="act_as_cell amount" style="width: 6.00%">
@@ -802,7 +804,7 @@
802
804
  %
803
805
  </div>
804
806
  </t>
805
- </t>
807
+ </t>
806
808
  </div>
807
809
  </div>
808
810
  </template>
@@ -492,8 +492,8 @@
492
492
  t-if="int(line['analytic_distribution'][analytic_id]) &lt; 100"
493
493
  >
494
494
  <t
495
- t-out="int(line['analytic_distribution'][analytic_id])"
496
- />%
495
+ t-out="int(line['analytic_distribution'][analytic_id])"
496
+ />%
497
497
  </t>
498
498
  </span>
499
499
  </div>
@@ -105,7 +105,7 @@
105
105
  </t>
106
106
  </t>
107
107
  <t t-else="">
108
- <t t-if="not with_auto_sequence">
108
+ <t t-if="not with_auto_sequence">
109
109
  <t t-set="account_column_style">
110
110
  width: 23.78%;
111
111
  </t>
@@ -198,12 +198,8 @@
198
198
  </b>
199
199
  </div>
200
200
  <t t-if="display_currency">
201
- <div class="act_as_cell" name="currency_name">
202
-
203
- </div>
204
- <div class="act_as_cell amount" name="amount_currency">
205
-
206
- </div>
201
+ <div class="act_as_cell" name="currency_name" />
202
+ <div class="act_as_cell amount" name="amount_currency" />
207
203
  </t>
208
204
  </div>
209
205
  <div style="width: 100%" />
@@ -256,8 +252,8 @@
256
252
  <span t-if="display_account_name">
257
253
  -
258
254
  <span
259
- t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name')"
260
- />
255
+ t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name')"
256
+ />
261
257
  </span>
262
258
  </div>
263
259
  <div class="act_as_cell left" name="partner">
@@ -443,77 +439,73 @@
443
439
  <div class="act_as_table data_table" style="width: 100%;">
444
440
  10
445
441
  <div class="act_as_row labels">
446
- <div
447
- class="act_as_cell first_column"
448
- name="name"
449
- style="width: 30.97%;"
450
- />
451
- <div class="act_as_cell" name="description" style="width: 13.27%;" />
452
- <div class="act_as_cell" name="base_debit" style="width: 9.29%;">
442
+ <div class="act_as_cell first_column" name="name" style="width: 30.97%;" />
443
+ <div class="act_as_cell" name="description" style="width: 13.27%;" />
444
+ <div class="act_as_cell" name="base_debit" style="width: 9.29%;">
453
445
  Debit
454
446
  </div>
455
- <div class="act_as_cell" name="base_credit" style="width: 9.29%;">
447
+ <div class="act_as_cell" name="base_credit" style="width: 9.29%;">
456
448
  Credit
457
449
  </div>
458
- <div class="act_as_cell" name="base_balance" style="width: 9.29%;">
450
+ <div class="act_as_cell" name="base_balance" style="width: 9.29%;">
459
451
  Balance
460
452
  </div>
461
- <div class="act_as_cell" name="tax_debit" style="width: 9.29%;">
453
+ <div class="act_as_cell" name="tax_debit" style="width: 9.29%;">
462
454
  Debit
463
455
  </div>
464
- <div class="act_as_cell" name="tax_credit" style="width: 9.29%;">
456
+ <div class="act_as_cell" name="tax_credit" style="width: 9.29%;">
465
457
  Credit
466
458
  </div>
467
- <div class="act_as_cell" name="tax_balance" style="width: 9.29%;">
459
+ <div class="act_as_cell" name="tax_balance" style="width: 9.29%;">
468
460
  Balance
469
461
  </div>
470
- </div>
462
+ </div>
471
463
  <t t-foreach="ReportTaxLines" t-as="tax_line">
472
- <div class="act_as_row lines">
473
- <div class="act_as_cell left" name="tax_name">
474
- <span t-esc="tax_line['tax_name']" />
475
- </div>
476
- <div class="act_as_cell left" name="tax_code">
477
- <span t-esc="tax_line['tax_code']" />
478
- </div>
479
- <div class="act_as_cell amount" name="base_debit">
480
- <span
481
- t-esc="tax_line['base_debit']"
482
- t-options="{'widget': 'float', 'precision': 2}"
483
- />
484
- </div>
485
- <div class="act_as_cell amount" name="base_credit">
486
- <span
487
- t-esc="tax_line['base_credit']"
488
- t-options="{'widget': 'float', 'precision': 2}"
489
- />
490
- </div>
491
- <div class="act_as_cell amount" name="base_balance">
492
- <span
493
- t-esc="tax_line['base_balance']"
494
- t-options="{'widget': 'float', 'precision': 2}"
495
- />
496
- </div>
497
- <div class="act_as_cell amount" name="tax_debit">
498
- <span
499
- t-esc="tax_line['tax_debit']"
500
- t-options="{'widget': 'float', 'precision': 2}"
501
- />
502
- </div>
503
- <div class="act_as_cell amount" name="tax_credit">
504
- <span
505
- t-esc="tax_line['tax_credit']"
506
- t-options="{'widget': 'float', 'precision': 2}"
507
- />
508
- </div>
509
- <div class="act_as_cell amount" name="tax_balance">
510
- <span
511
- t-esc="tax_line['tax_balance']"
512
- t-options="{'widget': 'float', 'precision': 2}"
513
- />
514
- </div>
464
+ <div class="act_as_row lines">
465
+ <div class="act_as_cell left" name="tax_name">
466
+ <span t-esc="tax_line['tax_name']" />
515
467
  </div>
516
- </t>
468
+ <div class="act_as_cell left" name="tax_code">
469
+ <span t-esc="tax_line['tax_code']" />
470
+ </div>
471
+ <div class="act_as_cell amount" name="base_debit">
472
+ <span
473
+ t-esc="tax_line['base_debit']"
474
+ t-options="{'widget': 'float', 'precision': 2}"
475
+ />
476
+ </div>
477
+ <div class="act_as_cell amount" name="base_credit">
478
+ <span
479
+ t-esc="tax_line['base_credit']"
480
+ t-options="{'widget': 'float', 'precision': 2}"
481
+ />
482
+ </div>
483
+ <div class="act_as_cell amount" name="base_balance">
484
+ <span
485
+ t-esc="tax_line['base_balance']"
486
+ t-options="{'widget': 'float', 'precision': 2}"
487
+ />
488
+ </div>
489
+ <div class="act_as_cell amount" name="tax_debit">
490
+ <span
491
+ t-esc="tax_line['tax_debit']"
492
+ t-options="{'widget': 'float', 'precision': 2}"
493
+ />
494
+ </div>
495
+ <div class="act_as_cell amount" name="tax_credit">
496
+ <span
497
+ t-esc="tax_line['tax_credit']"
498
+ t-options="{'widget': 'float', 'precision': 2}"
499
+ />
500
+ </div>
501
+ <div class="act_as_cell amount" name="tax_balance">
502
+ <span
503
+ t-esc="tax_line['tax_balance']"
504
+ t-options="{'widget': 'float', 'precision': 2}"
505
+ />
506
+ </div>
507
+ </div>
508
+ </t>
517
509
  </div>
518
510
  </template>
519
511
  </odoo>
@@ -1,10 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <odoo>
3
3
  <template id="account_financial_report.html_container">
4
- <link
5
- href="/account_financial_report/static/src/css/report_html.css"
6
- rel="stylesheet"
7
- />
4
+ <t t-call-assets="web.assets_backend" />
8
5
  <t t-set="body_classname" t-value="'container'" />
9
6
  <t t-call="web.report_layout">
10
7
  <t t-out="0" />
@@ -12,17 +9,14 @@
12
9
  </template>
13
10
  <template id="account_financial_report.internal_layout">
14
11
  <div class="article o_account_financial_reports_page">
15
- <link
16
- href="/account_financial_report/static/src/css/report.css"
17
- rel="stylesheet"
18
- />
12
+ <t t-call-assets="web.assets_backend" />
19
13
  <t t-out="0" />
20
14
  </div>
21
15
  <div class="footer">
22
16
  <div class="row">
23
17
  <div class="col-6 custom_footer">
24
18
  <span
25
- t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"
19
+ t-out="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"
26
20
  />
27
21
  </div>
28
22
  <div class="col-6 text-right custom_footer">
@@ -98,9 +98,7 @@
98
98
  <t t-set="style" t-value="'font-size:12px;'" />
99
99
  <!-- Different style for account group -->
100
100
  <t t-if="show_hierarchy">
101
- <t
102
- t-if="balance['type'] == 'group_type'"
103
- >
101
+ <t t-if="balance['type'] == 'group_type'">
104
102
  <t
105
103
  t-set="style"
106
104
  t-value="style + 'font-weight: bold; color: blue;'"
@@ -143,8 +141,8 @@
143
141
  view-type="form"
144
142
  >
145
143
  <t
146
- t-out="accounts_data[account_id]['code']"
147
- /> - <t t-out="accounts_data[account_id]['name']" />
144
+ t-out="accounts_data[account_id]['code']"
145
+ /> - <t t-out="accounts_data[account_id]['name']" />
148
146
  </span>
149
147
  </div>
150
148
  <div class="act_as_table data_table" style="width: 100%;">
@@ -1,5 +1,5 @@
1
- # ?? 2016 Julien Coux (Camptocamp)
2
- # ?? 2018 Forest and Biomass Romania SA
1
+ # © 2016 Julien Coux (Camptocamp)
2
+ # © 2018 Forest and Biomass Romania SA
3
3
  # Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
4
4
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5
5
 
@@ -24,7 +24,7 @@ class TrialBalanceReport(models.AbstractModel):
24
24
  show_partner_details,
25
25
  ):
26
26
  accounts_domain = [
27
- ("company_id", "=", company_id),
27
+ ("company_ids", "in", [company_id]),
28
28
  ("include_initial_balance", "=", True),
29
29
  ]
30
30
  if account_ids:
@@ -64,7 +64,7 @@ class TrialBalanceReport(models.AbstractModel):
64
64
  fy_start_date,
65
65
  ):
66
66
  accounts_domain = [
67
- ("company_id", "=", company_id),
67
+ ("company_ids", "in", [company_id]),
68
68
  ("include_initial_balance", "=", False),
69
69
  ]
70
70
  if account_ids:
@@ -142,7 +142,7 @@ class TrialBalanceReport(models.AbstractModel):
142
142
  show_partner_details,
143
143
  ):
144
144
  accounts_domain = [
145
- ("company_id", "=", company_id),
145
+ ("company_ids", "in", [company_id]),
146
146
  ("include_initial_balance", "=", False),
147
147
  ]
148
148
  if account_ids:
@@ -266,9 +266,9 @@ class TrialBalanceReport(models.AbstractModel):
266
266
  tb2 = tb["group_by_data"][gb_key]
267
267
  if "group_by_data" in total_amount[acc_id]:
268
268
  if gb_key not in total_amount[acc_id]["group_by_data"]:
269
- total_amount[acc_id]["group_by_data"][
270
- gb_key
271
- ] = self._prepare_total_amount(tb2, foreign_currency)
269
+ total_amount[acc_id]["group_by_data"][gb_key] = (
270
+ self._prepare_total_amount(tb2, foreign_currency)
271
+ )
272
272
  else:
273
273
  total_amount[acc_id]["group_by_data"][gb_key][
274
274
  "initial_balance"
@@ -419,7 +419,7 @@ class TrialBalanceReport(models.AbstractModel):
419
419
  fy_start_date,
420
420
  grouped_by,
421
421
  ):
422
- accounts_domain = [("company_id", "=", company_id)]
422
+ accounts_domain = [("company_ids", "in", [company_id])]
423
423
  if account_ids:
424
424
  accounts_domain += [("id", "in", account_ids)]
425
425
  # If explicit list of accounts is provided,
@@ -598,19 +598,19 @@ class TrialBalanceReport(models.AbstractModel):
598
598
  total_amount[unaffected_id]["ending_balance"] += pl_initial_balance
599
599
  total_amount[unaffected_id]["initial_balance"] += pl_initial_balance
600
600
  if foreign_currency:
601
- total_amount[unaffected_id][
602
- "ending_currency_balance"
603
- ] += pl_initial_currency_balance
604
- total_amount[unaffected_id][
605
- "initial_currency_balance"
606
- ] += pl_initial_currency_balance
601
+ total_amount[unaffected_id]["ending_currency_balance"] += (
602
+ pl_initial_currency_balance
603
+ )
604
+ total_amount[unaffected_id]["initial_currency_balance"] += (
605
+ pl_initial_currency_balance
606
+ )
607
607
  if grouped_by:
608
- total_amount[unaffected_id]["group_by_data"][0][
609
- "ending_balance"
610
- ] = total_amount[unaffected_id]["ending_balance"]
611
- total_amount[unaffected_id]["group_by_data"][0][
612
- "initial_balance"
613
- ] = total_amount[unaffected_id]["initial_balance"]
608
+ total_amount[unaffected_id]["group_by_data"][0]["ending_balance"] = (
609
+ total_amount[unaffected_id]["ending_balance"]
610
+ )
611
+ total_amount[unaffected_id]["group_by_data"][0]["initial_balance"] = (
612
+ total_amount[unaffected_id]["initial_balance"]
613
+ )
614
614
  if foreign_currency:
615
615
  total_amount[unaffected_id]["group_by_data"][0][
616
616
  "ending_currency_balance"
@@ -697,7 +697,6 @@ class TrialBalanceReport(models.AbstractModel):
697
697
  "code": group.code_prefix_start,
698
698
  "name": group.name,
699
699
  "parent_id": group.parent_id.id,
700
- "parent_path": group.parent_path,
701
700
  "complete_code": group.complete_code,
702
701
  "account_ids": group.compute_account_ids.ids,
703
702
  "type": "group_type",
@@ -751,7 +750,6 @@ class TrialBalanceReport(models.AbstractModel):
751
750
  "code": group.code_prefix_start,
752
751
  "name": group.name,
753
752
  "parent_id": group.parent_id.id,
754
- "parent_path": group.parent_path,
755
753
  "type": "group_type",
756
754
  "complete_code": group.complete_code,
757
755
  "account_ids": group.compute_account_ids.ids,
@@ -804,7 +802,6 @@ class TrialBalanceReport(models.AbstractModel):
804
802
  "code": group.code_prefix_start,
805
803
  "name": group.name,
806
804
  "parent_id": group.parent_id.id,
807
- "parent_path": group.parent_path,
808
805
  "type": "group_type",
809
806
  "complete_code": group.complete_code,
810
807
  "account_ids": group.compute_account_ids.ids,
@@ -833,12 +830,12 @@ class TrialBalanceReport(models.AbstractModel):
833
830
  "ending_balance"
834
831
  ]
835
832
  if foreign_currency:
836
- groups_data[group_id][
837
- "initial_currency_balance"
838
- ] += total_amount[acc_id]["initial_currency_balance"]
839
- groups_data[group_id][
840
- "ending_currency_balance"
841
- ] += total_amount[acc_id]["ending_currency_balance"]
833
+ groups_data[group_id]["initial_currency_balance"] += (
834
+ total_amount[acc_id]["initial_currency_balance"]
835
+ )
836
+ groups_data[group_id]["ending_currency_balance"] += (
837
+ total_amount[acc_id]["ending_currency_balance"]
838
+ )
842
839
  return groups_data
843
840
 
844
841
  def _get_report_values(self, docids, data):
@@ -1,6 +1,6 @@
1
1
  # Author: Julien Coux
2
2
  # Copyright 2016 Camptocamp SA
3
- # Copyright 2021 Tecnativa - Jo??o Marques
3
+ # Copyright 2021 Tecnativa - João Marques
4
4
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5
5
 
6
6
 
@@ -97,7 +97,9 @@ class VATReport(models.AbstractModel):
97
97
  return vat_data, tax_data
98
98
 
99
99
  def _get_tax_group_data(self, tax_group_ids):
100
- tax_groups = self.env["account.tax.group"].browse(tax_group_ids)
100
+ tax_groups = self.env["account.tax.group"].search_fetch(
101
+ [("id", "in", tax_group_ids)], ["name", "sequence"]
102
+ )
101
103
  tax_group_data = {}
102
104
  for tax_group in tax_groups:
103
105
  tax_group_data.update(
@@ -135,7 +137,7 @@ class VATReport(models.AbstractModel):
135
137
  vat_report[tax_group_id]["tax"] += tax_move_line["tax"]
136
138
  vat_report[tax_group_id][tax_id]["net"] += tax_move_line["net"]
137
139
  vat_report[tax_group_id][tax_id]["tax"] += tax_move_line["tax"]
138
- tax_group_data = self._get_tax_group_data(vat_report.keys())
140
+ tax_group_data = self._get_tax_group_data(list(vat_report.keys()))
139
141
  vat_report_list = []
140
142
  for tax_group_id in vat_report.keys():
141
143
  vat_report[tax_group_id]["name"] = tax_group_data[tax_group_id]["name"]
@@ -151,7 +153,9 @@ class VATReport(models.AbstractModel):
151
153
  return vat_report_list
152
154
 
153
155
  def _get_tags_data(self, tags_ids):
154
- tags = self.env["account.account.tag"].browse(tags_ids)
156
+ tags = self.env["account.account.tag"].search_fetch(
157
+ [("id", "in", tags_ids)], ["name"]
158
+ )
155
159
  tags_data = {}
156
160
  for tag in tags:
157
161
  tags_data.update({tag.id: {"code": "", "name": tag.name}})
@@ -183,7 +187,7 @@ class VATReport(models.AbstractModel):
183
187
  vat_report[tag_id][tax_id]["tax"] += tax_move_line["tax"]
184
188
  vat_report[tag_id]["net"] += tax_move_line["net"]
185
189
  vat_report[tag_id]["tax"] += tax_move_line["tax"]
186
- tags_data = self._get_tags_data(vat_report.keys())
190
+ tags_data = self._get_tags_data(list(vat_report.keys()))
187
191
  vat_report_list = []
188
192
  for tag_id in vat_report.keys():
189
193
  vat_report[tag_id]["name"] = tags_data[tag_id]["name"]
@@ -1,5 +1,5 @@
1
1
  # Copyright 2018 Forest and Biomass Romania
2
- # Copyright 2021 Tecnativa - Jo??o Marques
2
+ # Copyright 2021 Tecnativa - João Marques
3
3
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
4
 
5
5
  from odoo import _, models