odoo-addon-account-financial-report 17.0.1.6.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 +0 -28
  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.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.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.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.dist-info → odoo_addon_account_financial_report-18.0.1.0.0.2.dist-info}/top_level.txt +0 -0
@@ -367,9 +367,9 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:0005b241cf52744551edcda7c06e0c31788e033b7606a0021dcf5c7914999629
370
+ !! source digest: sha256:719cde7368fb38fa3fbd450e52fa3644c28a2c05cbf5b97bbc6645c88ac62a3b
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
- <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/17.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/18.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p>This module adds a set of financial reports. They are accessible under
374
374
  Invoicing / Reporting / OCA accounting reports.</p>
375
375
  <ul class="simple">
@@ -404,7 +404,8 @@ Partner Balance. For further information, check CONFIGURE.rst</p>
404
404
  <li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
405
405
  <li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
406
406
  <li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
407
- <li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
407
+ <li><a class="reference internal" href="#other-credits" id="toc-entry-11">Other credits</a></li>
408
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
408
409
  </ul>
409
410
  </li>
410
411
  </ul>
@@ -421,7 +422,7 @@ the interval</p>
421
422
  <p>-&gt; 15 -&gt; 30 -&gt; 60</p>
422
423
  <p>It means the first interval is from 0 to 15, the second from 16 to 30,
423
424
  and the third is 61+.</p>
424
- <p>Go on ‘Invoicing’ -&gt; ‘Reports’ -&gt; ‘OCA accounting reports’ -&gt; ‘Aged
425
+ <p>Go on ‘Invoicing’ -&gt; ‘Reporting’ -&gt; ‘OCA accounting reports’ -&gt; ‘Aged
425
426
  Partner Balance’</p>
426
427
  <p>When wizard is open, you need to select your interval configuration and
427
428
  print report.</p>
@@ -472,7 +473,7 @@ levels</li>
472
473
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
473
474
  In case of trouble, please check there if your issue has already been reported.
474
475
  If you spotted it first, help us to smash it by providing a detailed and welcomed
475
- <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
476
+ <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
476
477
  <p>Do not contact contributors directly about support or help with technical issues.</p>
477
478
  </div>
478
479
  <div class="section" id="credits">
@@ -511,7 +512,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
511
512
  <li>Pedro M. Baeza</li>
512
513
  <li>Sergio Teruel</li>
513
514
  <li>Ernesto Tejeda</li>
514
- <li>Jo??o Marques</li>
515
+ <li>João Marques</li>
515
516
  <li>Alexandre D. D??az</li>
516
517
  <li>V??ctor Mart??nez</li>
517
518
  <li>Carolina Fernandez</li>
@@ -525,12 +526,18 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
525
526
  <li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
526
527
  <li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
527
528
  <li>Omar Casti??eira &lt;<a class="reference external" href="mailto:omar&#64;comunitea.com">omar&#64;comunitea.com</a>&gt;</li>
529
+ <li>Chau Le &lt;<a class="reference external" href="mailto:chaulb&#64;trobz.com">chaulb&#64;trobz.com</a>&gt;</li>
528
530
  </ul>
529
531
  <p>Much of the work in this module was done at a sprint in Sorrento, Italy
530
532
  in April 2016.</p>
531
533
  </div>
534
+ <div class="section" id="other-credits">
535
+ <h2><a class="toc-backref" href="#toc-entry-11">Other credits</a></h2>
536
+ <p>The migration of this module from 17.0 to 18.0 was financially supported
537
+ by Camptocamp.</p>
538
+ </div>
532
539
  <div class="section" id="maintainers">
533
- <h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
540
+ <h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
534
541
  <p>This module is maintained by the OCA.</p>
535
542
  <a class="reference external image-reference" href="https://odoo-community.org">
536
543
  <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -538,7 +545,7 @@ in April 2016.</p>
538
545
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
539
546
  mission is to support the collaborative development of Odoo features and
540
547
  promote its widespread use.</p>
541
- <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/17.0/account_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p>
548
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/18.0/account_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p>
542
549
  <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
543
550
  </div>
544
551
  </div>
@@ -1,5 +1,3 @@
1
- /** @odoo-module */
2
-
3
1
  import {useComponent, useEffect} from "@odoo/owl";
4
2
 
5
3
  function toTitleCase(str) {
@@ -12,6 +10,7 @@ function toTitleCase(str) {
12
10
  }
13
11
 
14
12
  function enrich(component, targetElement, selector, isIFrame = false) {
13
+ // eslint-disable-next-line no-undef
15
14
  let doc = window.document;
16
15
  let contentDocument = targetElement;
17
16
 
@@ -1,4 +1,3 @@
1
- // /** @odoo-module **/
2
1
  import {ReportAction} from "@web/webclient/actions/reports/report_action";
3
2
  import {patch} from "@web/core/utils/patch";
4
3
  import {useEnrichWithActionLinks} from "./report.esm";
@@ -1,104 +1,137 @@
1
1
  a {
2
2
  color: #00337b;
3
3
  }
4
+
4
5
  .act_as_table {
5
6
  display: table !important;
6
7
  background-color: white;
7
8
  }
9
+
8
10
  .act_as_row {
9
11
  display: table-row !important;
10
12
  page-break-inside: avoid;
11
13
  }
14
+
12
15
  .act_as_cell {
13
16
  display: table-cell !important;
14
17
  page-break-inside: avoid;
15
18
  }
19
+
16
20
  .act_as_thead {
17
21
  display: table-header-group !important;
18
22
  }
23
+
19
24
  .act_as_tbody {
20
25
  display: table-row-group !important;
21
26
  }
27
+
22
28
  .list_table,
23
29
  .data_table,
24
30
  .totals_table {
25
31
  width: 100% !important;
26
32
  }
33
+
27
34
  .act_as_row.labels {
28
35
  background-color: #f0f0f0 !important;
29
36
  }
37
+
30
38
  .list_table,
31
39
  .data_table,
32
40
  .totals_table,
33
41
  .list_table .act_as_row {
34
- border-left: 0px;
35
- border-right: 0px;
42
+ border-left: 0;
43
+ border-right: 0;
36
44
  text-align: center;
37
45
  font-size: 10px;
38
- padding-right: 3px;
39
- padding-left: 3px;
40
- padding-top: 2px;
41
- padding-bottom: 2px;
46
+ padding: 2px 3px;
42
47
  border-collapse: collapse;
43
48
  }
49
+
44
50
  .totals_table {
45
51
  font-weight: bold;
46
52
  text-align: center;
47
53
  }
48
- .list_table .act_as_row.labels,
49
- .list_table .act_as_row.initial_balance,
50
- .list_table .act_as_row.lines {
51
- border-color: grey !important;
52
- border-bottom: 1px solid lightGrey !important;
54
+
55
+ .list_table {
56
+ .act_as_row {
57
+ &.labels,
58
+ &.initial_balance,
59
+ &.lines {
60
+ border-color: grey !important;
61
+ border-bottom: 1px solid lightGrey !important;
62
+ }
63
+ }
53
64
  }
54
- .data_table .act_as_cell {
55
- border: 1px solid lightGrey;
56
- text-align: center;
65
+
66
+ .data_table {
67
+ .act_as_cell {
68
+ border: 1px solid lightGrey;
69
+ text-align: center;
70
+ word-wrap: break-word;
71
+ }
72
+
73
+ .act_as_row.labels {
74
+ font-weight: bold;
75
+ }
57
76
  }
58
- .data_table .act_as_cell,
59
- .list_table .act_as_cell,
60
- .totals_table .act_as_cell {
61
- word-wrap: break-word;
77
+
78
+ .totals_table {
79
+ .act_as_cell {
80
+ word-wrap: break-word;
81
+ }
82
+
83
+ .act_as_row.labels {
84
+ font-weight: bold;
85
+ }
62
86
  }
63
- .data_table .act_as_row.labels,
64
- .totals_table .act_as_row.labels {
65
- font-weight: bold;
87
+
88
+ .list_table .act_as_cell {
89
+ &.first_column {
90
+ padding-left: 0;
91
+ /* border-left:1px solid lightGrey; uncomment to active column lines */
92
+ }
93
+
94
+ /* border-right:1px solid lightGrey; uncomment to active column lines */
66
95
  }
96
+
67
97
  .initial_balance .act_as_cell {
68
98
  font-style: italic;
69
99
  }
100
+
70
101
  .account_title {
71
102
  font-size: 11px;
72
103
  font-weight: bold;
104
+
105
+ &.labels {
106
+ background-color: #f0f0f0 !important;
107
+ }
73
108
  }
74
- .account_title.labels {
75
- background-color: #f0f0f0 !important;
76
- }
77
- .act_as_cell.amount {
78
- word-wrap: normal;
79
- text-align: right;
80
- }
81
- .act_as_cell.left {
82
- text-align: left;
83
- }
84
- .act_as_cell.right {
85
- text-align: right;
86
- }
87
- /*.list_table .act_as_cell {*/
88
- /* border-right:1px solid lightGrey; uncomment to active column lines */
89
- /*}*/
90
- .list_table .act_as_cell.first_column {
91
- padding-left: 0px;
92
- /* border-left:1px solid lightGrey; uncomment to active column lines */
109
+
110
+ .act_as_cell {
111
+ &.amount {
112
+ word-wrap: normal;
113
+ text-align: right;
114
+ }
115
+
116
+ &.left {
117
+ text-align: left;
118
+ }
119
+
120
+ &.right {
121
+ text-align: right;
122
+ }
93
123
  }
124
+
94
125
  .overflow_ellipsis {
95
126
  text-overflow: ellipsis;
96
127
  overflow: hidden;
97
128
  white-space: nowrap;
98
129
  }
130
+
99
131
  .custom_footer {
100
132
  font-size: 7px !important;
101
133
  }
134
+
102
135
  .page_break {
103
136
  page-break-inside: avoid;
104
137
  }
@@ -110,7 +143,6 @@ a {
110
143
  .o_account_financial_reports_page {
111
144
  padding-top: 10px;
112
145
  width: 90%;
113
- margin-right: auto;
114
- margin-left: auto;
146
+ margin: 0 auto;
115
147
  font-family: Helvetica, Arial;
116
148
  }
@@ -0,0 +1,10 @@
1
+ // Styles of HTML report
2
+ .account_title {
3
+ span {
4
+ font-size: 1rem !important;
5
+ }
6
+ }
7
+
8
+ .act_as_cell {
9
+ font-size: 0.9rem !important;
10
+ }
@@ -1,4 +1,4 @@
1
- # ?? 2016 Julien Coux (Camptocamp)
1
+ # © 2016 Julien Coux (Camptocamp)
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).-
3
3
 
4
4
  from . import test_aged_partner_balance
@@ -15,8 +15,8 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
15
15
  @tagged("post_install", "-at_install")
16
16
  class TestGeneralLedgerReport(AccountTestInvoicingCommon):
17
17
  @classmethod
18
- def setUpClass(cls, chart_template_ref=None):
19
- super().setUpClass(chart_template_ref=chart_template_ref)
18
+ def setUpClass(cls):
19
+ super().setUpClass()
20
20
  cls.env = cls.env(
21
21
  context=dict(
22
22
  cls.env.context,
@@ -42,7 +42,7 @@ class TestGeneralLedgerReport(AccountTestInvoicingCommon):
42
42
  "=",
43
43
  "equity_unaffected",
44
44
  ),
45
- ("company_id", "=", cls.env.user.company_id.id),
45
+ ("company_ids", "in", [cls.env.user.company_id.id]),
46
46
  ],
47
47
  limit=1,
48
48
  )
@@ -7,8 +7,7 @@ from datetime import datetime
7
7
  from dateutil.relativedelta import relativedelta
8
8
 
9
9
  from odoo.fields import Date
10
- from odoo.tests import tagged
11
- from odoo.tests.common import Form
10
+ from odoo.tests import Form, tagged
12
11
 
13
12
  from odoo.addons.account.tests.common import AccountTestInvoicingCommon
14
13
 
@@ -16,8 +15,8 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
16
15
  @tagged("post_install", "-at_install")
17
16
  class TestJournalReport(AccountTestInvoicingCommon):
18
17
  @classmethod
19
- def setUpClass(cls, chart_template_ref=None):
20
- super().setUpClass(chart_template_ref=chart_template_ref)
18
+ def setUpClass(cls):
19
+ super().setUpClass()
21
20
  cls.env = cls.env(
22
21
  context=dict(
23
22
  cls.env.context,
@@ -10,8 +10,8 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
10
10
  @tagged("post_install", "-at_install")
11
11
  class TestOpenItems(AccountTestInvoicingCommon):
12
12
  @classmethod
13
- def setUpClass(cls, chart_template_ref=None):
14
- super().setUpClass(chart_template_ref=chart_template_ref)
13
+ def setUpClass(cls):
14
+ super().setUpClass()
15
15
  cls.env = cls.env(
16
16
  context=dict(
17
17
  cls.env.context,
@@ -3,6 +3,8 @@
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
 
6
+ import re
7
+
6
8
  from odoo.tests import tagged
7
9
 
8
10
  from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@@ -11,8 +13,8 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
11
13
  @tagged("post_install", "-at_install")
12
14
  class TestTrialBalanceReport(AccountTestInvoicingCommon):
13
15
  @classmethod
14
- def setUpClass(cls, chart_template_ref=None):
15
- super().setUpClass(chart_template_ref=chart_template_ref)
16
+ def setUpClass(cls):
17
+ super().setUpClass()
16
18
  cls.env = cls.env(
17
19
  context=dict(
18
20
  cls.env.context,
@@ -69,11 +71,11 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
69
71
  "account_type": "income_other",
70
72
  },
71
73
  )
72
- cls.account301 = cls._create_account_account(
74
+ cls.account201 = cls._create_account_account(
73
75
  cls,
74
76
  {
75
- "code": "301",
76
- "name": "Account 301",
77
+ "code": "201",
78
+ "name": "Account 201",
77
79
  "group_id": cls.group2.id,
78
80
  "account_type": "income_other",
79
81
  },
@@ -167,7 +169,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
167
169
  "debit": receivable_credit,
168
170
  "credit": receivable_debit,
169
171
  "partner_id": partner.id,
170
- "account_id": self.account301.id,
172
+ "account_id": self.account201.id,
171
173
  },
172
174
  ),
173
175
  ],
@@ -686,8 +688,13 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
686
688
  self.assertEqual(total_debit, total_credit)
687
689
 
688
690
  def test_05_all_accounts_loaded(self):
689
- # Tests if all accounts are loaded when the account_code_ fields changed
690
- all_accounts = self.env["account.account"].search([], order="code")
691
+ # Tests if all accounts which code is number are loaded
692
+ # when the account_code_ fields changed
693
+ all_accounts = (
694
+ self.env["account.account"]
695
+ .search([], order="code")
696
+ .filtered(lambda acc: re.fullmatch(r"[0-9]+(\.[0-9]+)?", acc.code))
697
+ )
691
698
  company = self.env.user.company_id
692
699
  trial_balance = self.env["trial.balance.report.wizard"].create(
693
700
  {
@@ -6,8 +6,7 @@ import time
6
6
  from datetime import date
7
7
 
8
8
  from odoo import fields
9
- from odoo.tests import tagged
10
- from odoo.tests.common import Form
9
+ from odoo.tests import Form, tagged
11
10
 
12
11
  from odoo.addons.account.tests.common import AccountTestInvoicingCommon
13
12
 
@@ -47,8 +46,8 @@ class TestVATReport(AccountTestInvoicingCommon):
47
46
  return rslt
48
47
 
49
48
  @classmethod
50
- def setUpClass(cls, chart_template_ref=None):
51
- super().setUpClass(chart_template_ref=chart_template_ref)
49
+ def setUpClass(cls):
50
+ super().setUpClass()
52
51
  cls.env = cls.env(
53
52
  context=dict(
54
53
  cls.env.context,
@@ -68,7 +67,7 @@ class TestVATReport(AccountTestInvoicingCommon):
68
67
  cls.expense_account = cls.company_data["default_account_expense"]
69
68
  cls.tax_account = cls.env["account.account"].search(
70
69
  [
71
- ("company_id", "=", cls.company.id),
70
+ ("company_ids", "in", [cls.company.id]),
72
71
  (
73
72
  "account_type",
74
73
  "=",
@@ -14,28 +14,28 @@
14
14
  <field name="company_id" />
15
15
  </group>
16
16
  <field name="line_ids">
17
- <tree editable="bottom">
17
+ <list editable="bottom">
18
18
  <field name="name" />
19
19
  <field name="inferior_limit" />
20
- </tree>
20
+ </list>
21
21
  </field>
22
22
  </sheet>
23
23
  </form>
24
24
  </field>
25
25
  </record>
26
26
  <record id="aged_partner_report_configuration_tree" model="ir.ui.view">
27
- <field name="name">Age partner report configuration tree</field>
27
+ <field name="name">Age partner report configuration list</field>
28
28
  <field name="model">account.age.report.configuration</field>
29
29
  <field name="arch" type="xml">
30
- <tree>
30
+ <list>
31
31
  <field name="name" />
32
32
  <field name="company_id" />
33
- </tree>
33
+ </list>
34
34
  </field>
35
35
  </record>
36
36
  <record id="action_aged_partner_report_configuration" model="ir.actions.act_window">
37
37
  <field name="name">Age Partner Report Configuration</field>
38
38
  <field name="res_model">account.age.report.configuration</field>
39
- <field name="view_mode">tree,form</field>
39
+ <field name="view_mode">list,form</field>
40
40
  </record>
41
41
  </odoo>
@@ -63,7 +63,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
63
63
  )
64
64
  if self.company_id:
65
65
  self.account_ids = self.account_ids.filtered(
66
- lambda a: a.company_id == self.company_id
66
+ lambda a: self.company_id in a.company_ids
67
67
  )
68
68
  return {
69
69
  "domain": {
@@ -84,13 +84,15 @@ class AgedPartnerBalanceWizard(models.TransientModel):
84
84
  self.onchange_type_accounts_only()
85
85
  else:
86
86
  self.account_ids = self.account_ids.filtered(
87
- lambda a: a.company_id == self.company_id
87
+ lambda a: self.company_id in a.company_ids
88
88
  )
89
89
  res = {"domain": {"account_ids": [], "partner_ids": []}}
90
90
  if not self.company_id:
91
91
  return res
92
92
  else:
93
- res["domain"]["account_ids"] += [("company_id", "=", self.company_id.id)]
93
+ res["domain"]["account_ids"] += [
94
+ ("company_ids", "in", [self.company_id.id])
95
+ ]
94
96
  res["domain"]["partner_ids"] += self._get_partner_ids_domain()
95
97
  return res
96
98
 
@@ -101,7 +103,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
101
103
  @api.onchange("receivable_accounts_only", "payable_accounts_only")
102
104
  def onchange_type_accounts_only(self):
103
105
  """Handle receivable/payable accounts only change."""
104
- domain = [("company_id", "=", self.company_id.id)]
106
+ domain = [("company_ids", "in", [self.company_id.id])]
105
107
  if self.receivable_accounts_only or self.payable_accounts_only:
106
108
  if self.receivable_accounts_only and self.payable_accounts_only:
107
109
  domain += [
@@ -10,7 +10,7 @@
10
10
  import time
11
11
  from ast import literal_eval
12
12
 
13
- from odoo import _, api, fields, models
13
+ from odoo import api, fields, models
14
14
  from odoo.exceptions import ValidationError
15
15
  from odoo.tools import date_utils
16
16
 
@@ -147,7 +147,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
147
147
  count = self.env["account.account"].search_count(
148
148
  [
149
149
  ("account_type", "=", "equity_unaffected"),
150
- ("company_id", "=", self.company_id.id or self.env.company.id),
150
+ ("company_ids", "in", [self.company_id.id or self.env.company.id]),
151
151
  ]
152
152
  )
153
153
  return count == 1
@@ -226,7 +226,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
226
226
  and rec.company_id != rec.date_range_id.company_id
227
227
  ):
228
228
  raise ValidationError(
229
- _(
229
+ self.env._(
230
230
  "The Company in the General Ledger Report Wizard and in "
231
231
  "Date Range must be the same."
232
232
  )
@@ -236,7 +236,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
236
236
  def onchange_type_accounts_only(self):
237
237
  """Handle receivable/payable accounts only change."""
238
238
  if self.receivable_accounts_only or self.payable_accounts_only:
239
- domain = [("company_id", "=", self.company_id.id)]
239
+ domain = [("company_ids", "in", [self.company_id.id])]
240
240
  if self.receivable_accounts_only and self.payable_accounts_only:
241
241
  domain += [
242
242
  ("account_type", "in", ("asset_receivable", "liability_payable"))
@@ -263,7 +263,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
263
263
  record.unaffected_earnings_account = self.env["account.account"].search(
264
264
  [
265
265
  ("account_type", "=", "equity_unaffected"),
266
- ("company_id", "=", record.company_id.id),
266
+ ("company_ids", "in", [record.company_id.id]),
267
267
  ]
268
268
  )
269
269
 
@@ -105,24 +105,24 @@
105
105
  <footer>
106
106
  <div invisible="not only_one_unaffected_earnings_account">
107
107
  <button
108
- name="button_export_html"
109
- string="View"
110
- type="object"
111
- default_focus="1"
112
- class="oe_highlight"
113
- />
108
+ name="button_export_html"
109
+ string="View"
110
+ type="object"
111
+ default_focus="1"
112
+ class="oe_highlight"
113
+ />
114
114
  or
115
115
  <button
116
- name="button_export_pdf"
117
- string="Export PDF"
118
- type="object"
119
- />
116
+ name="button_export_pdf"
117
+ string="Export PDF"
118
+ type="object"
119
+ />
120
120
  or
121
121
  <button
122
- name="button_export_xlsx"
123
- string="Export XLSX"
124
- type="object"
125
- />
122
+ name="button_export_xlsx"
123
+ string="Export XLSX"
124
+ type="object"
125
+ />
126
126
  or
127
127
  <button string="Cancel" class="oe_link" special="cancel" />
128
128
  </div>
@@ -1,7 +1,7 @@
1
1
  # Copyright 2017 ACSONE SA/NV
2
2
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
3
 
4
- from odoo import _, api, fields, models
4
+ from odoo import api, fields, models
5
5
 
6
6
 
7
7
  class JournalLedgerReportWizard(models.TransientModel):
@@ -38,15 +38,19 @@ class JournalLedgerReportWizard(models.TransientModel):
38
38
 
39
39
  @api.model
40
40
  def _get_move_targets(self):
41
- return [("all", _("All")), ("posted", _("Posted")), ("draft", _("Not Posted"))]
41
+ return [
42
+ ("all", self.env._("All")),
43
+ ("posted", self.env._("Posted")),
44
+ ("draft", self.env._("Not Posted")),
45
+ ]
42
46
 
43
47
  @api.model
44
48
  def _get_sort_options(self):
45
- return [("move_name", _("Entry number")), ("date", _("Date"))]
49
+ return [("move_name", self.env._("Entry number")), ("date", self.env._("Date"))]
46
50
 
47
51
  @api.model
48
52
  def _get_group_options(self):
49
- return [("journal", _("Journal")), ("none", _("No group"))]
53
+ return [("journal", self.env._("Journal")), ("none", self.env._("No group"))]
50
54
 
51
55
  @api.onchange("date_range_id")
52
56
  def onchange_date_range_id(self):