odoo-addon-account-financial-report 17.0.1.6.1.1__py3-none-any.whl → 18.0.1.0.0.3__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 +3 -100
  5. odoo/addons/account_financial_report/i18n/ca.po +1 -100
  6. odoo/addons/account_financial_report/i18n/de.po +3 -100
  7. odoo/addons/account_financial_report/i18n/es.po +0 -100
  8. odoo/addons/account_financial_report/i18n/es_AR.po +0 -100
  9. odoo/addons/account_financial_report/i18n/es_MX.po +0 -100
  10. odoo/addons/account_financial_report/i18n/fr.po +0 -100
  11. odoo/addons/account_financial_report/i18n/fr_CH.po +1 -100
  12. odoo/addons/account_financial_report/i18n/fr_FR.po +0 -100
  13. odoo/addons/account_financial_report/i18n/hr.po +0 -100
  14. odoo/addons/account_financial_report/i18n/hr_HR.po +3 -100
  15. odoo/addons/account_financial_report/i18n/it.po +3 -107
  16. odoo/addons/account_financial_report/i18n/ja.po +3 -100
  17. odoo/addons/account_financial_report/i18n/nl.po +1 -100
  18. odoo/addons/account_financial_report/i18n/nl_NL.po +2 -100
  19. odoo/addons/account_financial_report/i18n/pt.po +0 -100
  20. odoo/addons/account_financial_report/i18n/pt_BR.po +0 -100
  21. odoo/addons/account_financial_report/i18n/ro.po +1 -100
  22. odoo/addons/account_financial_report/i18n/sv.po +0 -100
  23. odoo/addons/account_financial_report/i18n/tr.po +0 -100
  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.3.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.3.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.3.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.3.dist-info}/top_level.txt +0 -0
@@ -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):
@@ -41,24 +41,24 @@
41
41
  </group>
42
42
  <footer>
43
43
  <button
44
- name="button_export_html"
45
- string="View"
46
- type="object"
47
- default_focus="1"
48
- class="oe_highlight"
49
- />
44
+ name="button_export_html"
45
+ string="View"
46
+ type="object"
47
+ default_focus="1"
48
+ class="oe_highlight"
49
+ />
50
50
  or
51
51
  <button
52
- name="button_export_pdf"
53
- string="Export PDF"
54
- type="object"
55
- />
52
+ name="button_export_pdf"
53
+ string="Export PDF"
54
+ type="object"
55
+ />
56
56
  or
57
57
  <button
58
- name="button_export_xlsx"
59
- string="Export XLSX"
60
- type="object"
61
- />
58
+ name="button_export_xlsx"
59
+ string="Export XLSX"
60
+ type="object"
61
+ />
62
62
  or
63
63
  <button string="Cancel" class="oe_link" special="cancel" />
64
64
  </footer>
@@ -120,7 +120,7 @@ class OpenItemsReportWizard(models.TransientModel):
120
120
  @api.onchange("receivable_accounts_only", "payable_accounts_only")
121
121
  def onchange_type_accounts_only(self):
122
122
  """Handle receivable/payable accounts only change."""
123
- domain = [("company_id", "=", self.company_id.id)]
123
+ domain = [("company_ids", "in", [self.company_id.id])]
124
124
  if self.receivable_accounts_only or self.payable_accounts_only:
125
125
  if self.receivable_accounts_only and self.payable_accounts_only:
126
126
  domain += [
@@ -63,24 +63,24 @@
63
63
  </group>
64
64
  <footer>
65
65
  <button
66
- name="button_export_html"
67
- string="View"
68
- type="object"
69
- default_focus="1"
70
- class="oe_highlight"
71
- />
66
+ name="button_export_html"
67
+ string="View"
68
+ type="object"
69
+ default_focus="1"
70
+ class="oe_highlight"
71
+ />
72
72
  or
73
73
  <button
74
- name="button_export_pdf"
75
- string="Export PDF"
76
- type="object"
77
- />
74
+ name="button_export_pdf"
75
+ string="Export PDF"
76
+ type="object"
77
+ />
78
78
  or
79
79
  <button
80
- name="button_export_xlsx"
81
- string="Export XLSX"
82
- type="object"
83
- />
80
+ name="button_export_xlsx"
81
+ string="Export XLSX"
82
+ type="object"
83
+ />
84
84
  or
85
85
  <button string="Cancel" class="oe_link" special="cancel" />
86
86
  </footer>