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.
- odoo/addons/account_financial_report/README.rst +15 -8
- odoo/addons/account_financial_report/__manifest__.py +3 -2
- odoo/addons/account_financial_report/i18n/account_financial_report.pot +1 -124
- odoo/addons/account_financial_report/i18n/ar.po +3 -100
- odoo/addons/account_financial_report/i18n/ca.po +1 -100
- odoo/addons/account_financial_report/i18n/de.po +3 -100
- odoo/addons/account_financial_report/i18n/es.po +0 -100
- odoo/addons/account_financial_report/i18n/es_AR.po +0 -100
- odoo/addons/account_financial_report/i18n/es_MX.po +0 -100
- odoo/addons/account_financial_report/i18n/fr.po +0 -100
- odoo/addons/account_financial_report/i18n/fr_CH.po +1 -100
- odoo/addons/account_financial_report/i18n/fr_FR.po +0 -100
- odoo/addons/account_financial_report/i18n/hr.po +0 -100
- odoo/addons/account_financial_report/i18n/hr_HR.po +3 -100
- odoo/addons/account_financial_report/i18n/it.po +3 -107
- odoo/addons/account_financial_report/i18n/ja.po +3 -100
- odoo/addons/account_financial_report/i18n/nl.po +1 -100
- odoo/addons/account_financial_report/i18n/nl_NL.po +2 -100
- odoo/addons/account_financial_report/i18n/pt.po +0 -100
- odoo/addons/account_financial_report/i18n/pt_BR.po +0 -100
- odoo/addons/account_financial_report/i18n/ro.po +1 -100
- odoo/addons/account_financial_report/i18n/sv.po +0 -100
- odoo/addons/account_financial_report/i18n/tr.po +0 -100
- odoo/addons/account_financial_report/models/account.py +1 -1
- odoo/addons/account_financial_report/models/account_age_report_configuration.py +6 -4
- odoo/addons/account_financial_report/models/account_group.py +3 -3
- odoo/addons/account_financial_report/readme/CONFIGURE.md +1 -1
- odoo/addons/account_financial_report/readme/CONTRIBUTORS.md +2 -1
- odoo/addons/account_financial_report/readme/CREDITS.md +1 -0
- odoo/addons/account_financial_report/report/__init__.py +3 -3
- odoo/addons/account_financial_report/report/abstract_report.py +3 -1
- odoo/addons/account_financial_report/report/abstract_report_xlsx.py +5 -5
- odoo/addons/account_financial_report/report/aged_partner_balance.py +16 -20
- odoo/addons/account_financial_report/report/aged_partner_balance_xlsx.py +30 -30
- odoo/addons/account_financial_report/report/general_ledger.py +26 -14
- odoo/addons/account_financial_report/report/general_ledger_xlsx.py +3 -3
- odoo/addons/account_financial_report/report/journal_ledger.py +9 -9
- odoo/addons/account_financial_report/report/journal_ledger_xlsx.py +1 -1
- odoo/addons/account_financial_report/report/open_items.py +1 -1
- odoo/addons/account_financial_report/report/open_items_xlsx.py +1 -1
- odoo/addons/account_financial_report/report/templates/aged_partner_balance.xml +29 -27
- odoo/addons/account_financial_report/report/templates/general_ledger.xml +2 -2
- odoo/addons/account_financial_report/report/templates/journal_ledger.xml +58 -66
- odoo/addons/account_financial_report/report/templates/layouts.xml +3 -9
- odoo/addons/account_financial_report/report/templates/trial_balance.xml +3 -5
- odoo/addons/account_financial_report/report/trial_balance.py +27 -30
- odoo/addons/account_financial_report/report/trial_balance_xlsx.py +1 -1
- odoo/addons/account_financial_report/report/vat_report.py +8 -4
- odoo/addons/account_financial_report/report/vat_report_xlsx.py +1 -1
- odoo/addons/account_financial_report/static/description/index.html +15 -8
- odoo/addons/account_financial_report/static/src/js/report.esm.js +1 -2
- odoo/addons/account_financial_report/static/src/js/report_action.esm.js +0 -1
- odoo/addons/account_financial_report/static/src/{css/report.css → scss/report.scss} +74 -42
- odoo/addons/account_financial_report/static/src/scss/report_html.scss +10 -0
- odoo/addons/account_financial_report/tests/__init__.py +1 -1
- odoo/addons/account_financial_report/tests/test_general_ledger.py +3 -3
- odoo/addons/account_financial_report/tests/test_journal_ledger.py +3 -4
- odoo/addons/account_financial_report/tests/test_open_items.py +2 -2
- odoo/addons/account_financial_report/tests/test_trial_balance.py +15 -8
- odoo/addons/account_financial_report/tests/test_vat_report.py +4 -5
- odoo/addons/account_financial_report/view/account_age_report_configuration_views.xml +6 -6
- odoo/addons/account_financial_report/wizard/aged_partner_balance_wizard.py +6 -4
- odoo/addons/account_financial_report/wizard/general_ledger_wizard.py +5 -5
- odoo/addons/account_financial_report/wizard/general_ledger_wizard_view.xml +14 -14
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard.py +8 -4
- odoo/addons/account_financial_report/wizard/journal_ledger_wizard_view.xml +14 -14
- odoo/addons/account_financial_report/wizard/open_items_wizard.py +1 -1
- odoo/addons/account_financial_report/wizard/open_items_wizard_view.xml +14 -14
- odoo/addons/account_financial_report/wizard/trial_balance_wizard.py +10 -8
- odoo/addons/account_financial_report/wizard/trial_balance_wizard_view.xml +14 -14
- odoo/addons/account_financial_report/wizard/vat_report_wizard.py +2 -2
- odoo/addons/account_financial_report/wizard/vat_report_wizard_view.xml +14 -14
- {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
- {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
- odoo/addons/account_financial_report/static/src/css/report_html.css +0 -7
- {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
- {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,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:
|
|
35
|
-
border-right:
|
|
42
|
+
border-left: 0;
|
|
43
|
+
border-right: 0;
|
|
36
44
|
text-align: center;
|
|
37
45
|
font-size: 10px;
|
|
38
|
-
padding
|
|
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
|
-
|
|
49
|
-
.list_table
|
|
50
|
-
.
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
.
|
|
60
|
-
.
|
|
61
|
-
|
|
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
|
-
|
|
64
|
-
.
|
|
65
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
|
114
|
-
margin-left: auto;
|
|
146
|
+
margin: 0 auto;
|
|
115
147
|
font-family: Helvetica, Arial;
|
|
116
148
|
}
|
|
@@ -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
|
|
19
|
-
super().setUpClass(
|
|
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
|
-
("
|
|
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
|
|
20
|
-
super().setUpClass(
|
|
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
|
|
14
|
-
super().setUpClass(
|
|
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
|
|
15
|
-
super().setUpClass(
|
|
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.
|
|
74
|
+
cls.account201 = cls._create_account_account(
|
|
73
75
|
cls,
|
|
74
76
|
{
|
|
75
|
-
"code": "
|
|
76
|
-
"name": "Account
|
|
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.
|
|
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
|
|
690
|
-
|
|
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
|
|
51
|
-
super().setUpClass(
|
|
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
|
-
("
|
|
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
|
-
<
|
|
17
|
+
<list editable="bottom">
|
|
18
18
|
<field name="name" />
|
|
19
19
|
<field name="inferior_limit" />
|
|
20
|
-
</
|
|
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
|
|
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
|
-
<
|
|
30
|
+
<list>
|
|
31
31
|
<field name="name" />
|
|
32
32
|
<field name="company_id" />
|
|
33
|
-
</
|
|
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">
|
|
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:
|
|
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:
|
|
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"] += [
|
|
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 = [("
|
|
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
|
|
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
|
-
("
|
|
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 = [("
|
|
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
|
-
("
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
name="button_export_pdf"
|
|
117
|
+
string="Export PDF"
|
|
118
|
+
type="object"
|
|
119
|
+
/>
|
|
120
120
|
or
|
|
121
121
|
<button
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
|
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 [
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
name="button_export_pdf"
|
|
53
|
+
string="Export PDF"
|
|
54
|
+
type="object"
|
|
55
|
+
/>
|
|
56
56
|
or
|
|
57
57
|
<button
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 = [("
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
name="button_export_pdf"
|
|
75
|
+
string="Export PDF"
|
|
76
|
+
type="object"
|
|
77
|
+
/>
|
|
78
78
|
or
|
|
79
79
|
<button
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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>
|