odoo-addon-mis-builder 17.0.1.2.2__py3-none-any.whl → 18.0.1.0.0.11__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.
- odoo/addons/mis_builder/README.rst +7 -6
- odoo/addons/mis_builder/__manifest__.py +3 -3
- odoo/addons/mis_builder/datas/ir_cron.xml +1 -3
- odoo/addons/mis_builder/i18n/ca.po +8 -51
- odoo/addons/mis_builder/i18n/de.po +4 -39
- odoo/addons/mis_builder/i18n/el.po +4 -39
- odoo/addons/mis_builder/i18n/el_GR.po +4 -39
- odoo/addons/mis_builder/i18n/es.po +12 -65
- odoo/addons/mis_builder/i18n/fr.po +12 -65
- odoo/addons/mis_builder/i18n/hr.po +4 -39
- odoo/addons/mis_builder/i18n/it.po +13 -80
- odoo/addons/mis_builder/i18n/mis_builder.pot +13 -125
- odoo/addons/mis_builder/i18n/nl.po +4 -39
- odoo/addons/mis_builder/i18n/nl_NL.po +4 -39
- odoo/addons/mis_builder/i18n/pt.po +4 -39
- odoo/addons/mis_builder/i18n/pt_BR.po +13 -64
- odoo/addons/mis_builder/i18n/sv.po +12 -64
- odoo/addons/mis_builder/i18n/tr.po +4 -39
- odoo/addons/mis_builder/i18n/zh_CN.po +78 -154
- odoo/addons/mis_builder/models/aep.py +62 -160
- odoo/addons/mis_builder/models/aggregate.py +4 -4
- odoo/addons/mis_builder/models/kpimatrix.py +9 -10
- odoo/addons/mis_builder/models/mis_kpi_data.py +5 -7
- odoo/addons/mis_builder/models/mis_report.py +47 -58
- odoo/addons/mis_builder/models/mis_report_instance.py +39 -24
- odoo/addons/mis_builder/models/mis_report_style.py +9 -12
- odoo/addons/mis_builder/models/mis_report_subreport.py +5 -4
- odoo/addons/mis_builder/models/prorata_read_group_mixin.py +51 -31
- odoo/addons/mis_builder/models/simple_array.py +2 -2
- odoo/addons/mis_builder/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/mis_builder/report/mis_report_instance_xlsx.py +2 -2
- odoo/addons/mis_builder/static/description/index.html +5 -4
- odoo/addons/mis_builder/static/src/components/mis_report_widget.esm.js +12 -21
- odoo/addons/mis_builder/static/src/components/mis_report_widget.scss +68 -0
- odoo/addons/mis_builder/static/src/components/mis_report_widget.xml +9 -14
- odoo/addons/mis_builder/static/src/scss/report.scss +49 -0
- odoo/addons/mis_builder/tests/__init__.py +1 -0
- odoo/addons/mis_builder/tests/common.py +2 -4
- odoo/addons/mis_builder/tests/fake_models.py +18 -1
- odoo/addons/mis_builder/tests/test_aep.py +7 -69
- odoo/addons/mis_builder/tests/test_data_sources.py +4 -11
- odoo/addons/mis_builder/tests/test_kpi_data.py +1 -5
- odoo/addons/mis_builder/tests/test_mis_report_instance.py +21 -17
- odoo/addons/mis_builder/tests/test_multi_company_aep.py +3 -3
- odoo/addons/mis_builder/tests/test_pro_rata_read_group.py +105 -0
- odoo/addons/mis_builder/views/mis_report.xml +38 -43
- odoo/addons/mis_builder/views/mis_report_instance.xml +37 -40
- odoo/addons/mis_builder/views/mis_report_style.xml +6 -6
- odoo/addons/mis_builder/wizard/mis_builder_dashboard.py +3 -3
- odoo/addons/mis_builder/wizard/mis_builder_dashboard.xml +6 -6
- {odoo_addon_mis_builder-17.0.1.2.2.dist-info → odoo_addon_mis_builder-18.0.1.0.0.11.dist-info}/METADATA +12 -11
- odoo_addon_mis_builder-18.0.1.0.0.11.dist-info/RECORD +87 -0
- odoo/addons/mis_builder/static/src/components/mis_report_widget.css +0 -67
- odoo/addons/mis_builder/static/src/css/report.css +0 -46
- odoo_addon_mis_builder-17.0.1.2.2.dist-info/RECORD +0 -86
- {odoo_addon_mis_builder-17.0.1.2.2.dist-info → odoo_addon_mis_builder-18.0.1.0.0.11.dist-info}/WHEEL +0 -0
- {odoo_addon_mis_builder-17.0.1.2.2.dist-info → odoo_addon_mis_builder-18.0.1.0.0.11.dist-info}/top_level.txt +0 -0
@@ -412,7 +412,7 @@ class TestMisReportInstance(common.HttpCase):
|
|
412
412
|
.search(
|
413
413
|
[
|
414
414
|
("code", "=like", "200%"),
|
415
|
-
("
|
415
|
+
("company_ids", "in", [self.env.ref("base.main_company").id]),
|
416
416
|
]
|
417
417
|
)
|
418
418
|
.ids
|
@@ -429,10 +429,8 @@ class TestMisReportInstance(common.HttpCase):
|
|
429
429
|
"account_id": account.id,
|
430
430
|
}
|
431
431
|
action_name = self.report_instance._get_drilldown_action_name(args)
|
432
|
-
expected_name =
|
433
|
-
|
434
|
-
account=account.display_name,
|
435
|
-
period=period.display_name,
|
432
|
+
expected_name = (
|
433
|
+
f"{self.kpi1.description} - {account.display_name} - {period.display_name}"
|
436
434
|
)
|
437
435
|
assert action_name == expected_name
|
438
436
|
|
@@ -458,7 +456,7 @@ class TestMisReportInstance(common.HttpCase):
|
|
458
456
|
"arch": "<graph><field name='name'/></graph>",
|
459
457
|
},
|
460
458
|
{
|
461
|
-
"name": "
|
459
|
+
"name": "mis_report_test_drilldown_views_list",
|
462
460
|
"model": model_name,
|
463
461
|
"arch": "<pivot><field name='name'/></pivot>",
|
464
462
|
},
|
@@ -477,19 +475,19 @@ class TestMisReportInstance(common.HttpCase):
|
|
477
475
|
"arch": "<form><field name='name'/></form>",
|
478
476
|
},
|
479
477
|
{
|
480
|
-
"name": "
|
478
|
+
"name": "mis_report_test_drilldown_views_list",
|
481
479
|
"model": model_name,
|
482
|
-
"arch": "<
|
480
|
+
"arch": "<list><field name='name'/></list>",
|
483
481
|
},
|
484
482
|
]
|
485
483
|
)
|
486
484
|
action = self.report_instance.drilldown(
|
487
485
|
dict(expr="balp[200%]", period_id=self.report_instance.period_ids[0].id)
|
488
486
|
)
|
489
|
-
self.assertEqual(action["view_mode"], "
|
487
|
+
self.assertEqual(action["view_mode"], "list,form,pivot,graph")
|
490
488
|
self.assertEqual(
|
491
489
|
action["views"],
|
492
|
-
[[False, "
|
490
|
+
[[False, "list"], [False, "form"], [False, "pivot"], [False, "graph"]],
|
493
491
|
)
|
494
492
|
|
495
493
|
def test_qweb(self):
|
@@ -504,12 +502,18 @@ class TestMisReportInstance(common.HttpCase):
|
|
504
502
|
|
505
503
|
def test_xlsx(self):
|
506
504
|
self.report_instance.export_xls() # get action
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
505
|
+
with self.assertLogs("odoo.tools.test_reports", level="WARNING") as log_catcher:
|
506
|
+
test_reports.try_report(
|
507
|
+
self.env.cr,
|
508
|
+
self.env.uid,
|
509
|
+
"mis_builder.mis_report_instance_xlsx",
|
510
|
+
[self.report_instance.id],
|
511
|
+
report_type="xlsx",
|
512
|
+
)
|
513
|
+
self.assertIn(
|
514
|
+
'Report mis_builder.mis_report_instance_xlsx produced a "xlsx" chunk, '
|
515
|
+
"cannot examine it",
|
516
|
+
log_catcher.output[0],
|
513
517
|
)
|
514
518
|
|
515
519
|
def test_get_kpis_by_account_id(self):
|
@@ -518,7 +522,7 @@ class TestMisReportInstance(common.HttpCase):
|
|
518
522
|
.search(
|
519
523
|
[
|
520
524
|
("code", "=like", "200%"),
|
521
|
-
("
|
525
|
+
("company_ids", "in", [self.env.ref("base.main_company").id]),
|
522
526
|
]
|
523
527
|
)
|
524
528
|
.ids
|
@@ -4,7 +4,7 @@
|
|
4
4
|
import datetime
|
5
5
|
|
6
6
|
import odoo.tests.common as common
|
7
|
-
from odoo import fields
|
7
|
+
from odoo import Command, fields
|
8
8
|
from odoo.tools.safe_eval import safe_eval
|
9
9
|
|
10
10
|
from ..models.accounting_none import AccountingNone
|
@@ -43,7 +43,7 @@ class TestMultiCompanyAEP(common.TransactionCase):
|
|
43
43
|
"account_ar_" + company_key,
|
44
44
|
self.account_model.create(
|
45
45
|
{
|
46
|
-
"
|
46
|
+
"company_ids": [Command.link(company.id)],
|
47
47
|
"code": "400AR",
|
48
48
|
"name": "Receivable",
|
49
49
|
"account_type": "asset_receivable",
|
@@ -57,7 +57,7 @@ class TestMultiCompanyAEP(common.TransactionCase):
|
|
57
57
|
"account_in_" + company_key,
|
58
58
|
self.account_model.create(
|
59
59
|
{
|
60
|
-
"
|
60
|
+
"company_ids": [Command.link(company.id)],
|
61
61
|
"code": "700IN",
|
62
62
|
"name": "Income",
|
63
63
|
"account_type": "income",
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# Copyright 2025 ACSONE SA/NV (<http://acsone.eu>)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
3
|
+
|
4
|
+
from odoo_test_helper import FakeModelLoader
|
5
|
+
|
6
|
+
from odoo.tests import TransactionCase
|
7
|
+
|
8
|
+
|
9
|
+
class TestProrataReadGroup(TransactionCase):
|
10
|
+
@classmethod
|
11
|
+
def setUpClass(cls):
|
12
|
+
super().setUpClass()
|
13
|
+
cls.loader = FakeModelLoader(cls.env, cls.__module__)
|
14
|
+
cls.loader.backup_registry()
|
15
|
+
from .fake_models import ProrataReadGroupThing
|
16
|
+
|
17
|
+
cls.loader.update_registry((ProrataReadGroupThing,))
|
18
|
+
cls.addClassCleanup(cls.loader.restore_registry)
|
19
|
+
|
20
|
+
cls.thing_model = cls.env["prorata.read.group.thing"]
|
21
|
+
cls.thing_model.create(
|
22
|
+
{
|
23
|
+
"date_from": "2024-01-01",
|
24
|
+
"date_to": "2024-01-05",
|
25
|
+
"account_code": "A1",
|
26
|
+
"debit": 7,
|
27
|
+
"credit": 0,
|
28
|
+
}
|
29
|
+
)
|
30
|
+
cls.thing_model.create(
|
31
|
+
{
|
32
|
+
"date_from": "2024-01-01",
|
33
|
+
"date_to": "2024-01-20",
|
34
|
+
"account_code": "A1",
|
35
|
+
"debit": 200,
|
36
|
+
"credit": 0,
|
37
|
+
}
|
38
|
+
)
|
39
|
+
cls.thing_model.create(
|
40
|
+
{
|
41
|
+
"date_from": "2024-01-15",
|
42
|
+
"date_to": "2024-01-20",
|
43
|
+
"account_code": "A1",
|
44
|
+
"debit": 11,
|
45
|
+
"credit": 0,
|
46
|
+
}
|
47
|
+
)
|
48
|
+
|
49
|
+
def test_prorata_read_group(self):
|
50
|
+
"""Test a pro-rata read_group with a date period."""
|
51
|
+
data = self.thing_model.read_group(
|
52
|
+
[("date", ">=", "2024-01-11"), ("date", "<=", "2024-01-20")],
|
53
|
+
fields=["debit", "credit", "account_code", "company_id"],
|
54
|
+
groupby=["account_code", "company_id"],
|
55
|
+
lazy=False,
|
56
|
+
)[0]
|
57
|
+
self.assertEqual(data["debit"], 111)
|
58
|
+
self.assertEqual(data["credit"], 0)
|
59
|
+
self.assertEqual(data["account_code"], "A1")
|
60
|
+
self.assertEqual(
|
61
|
+
data["company_id"], (self.env.company.id, self.env.company.name)
|
62
|
+
)
|
63
|
+
|
64
|
+
def test_read_group(self):
|
65
|
+
"""Test a regular read_group without date filtering still works."""
|
66
|
+
data = self.thing_model.read_group(
|
67
|
+
domain=[],
|
68
|
+
fields=["debit", "credit", "account_code", "company_id"],
|
69
|
+
groupby=["account_code", "company_id"],
|
70
|
+
lazy=False,
|
71
|
+
)[0]
|
72
|
+
self.assertEqual(data["debit"], 218)
|
73
|
+
self.assertEqual(data["credit"], 0)
|
74
|
+
self.assertEqual(data["account_code"], "A1")
|
75
|
+
self.assertEqual(
|
76
|
+
data["company_id"], (self.env.company.id, self.env.company.name)
|
77
|
+
)
|
78
|
+
|
79
|
+
def test_prorata_read_group_internal(self):
|
80
|
+
"""Test a regular _read_group without date filtering still works."""
|
81
|
+
data = self.thing_model._read_group(
|
82
|
+
domain=[("date", ">=", "2024-01-11"), ("date", "<=", "2024-01-20")],
|
83
|
+
groupby=["account_code", "company_id"],
|
84
|
+
aggregates=["debit:sum", "credit:sum"],
|
85
|
+
)
|
86
|
+
self.assertEqual(
|
87
|
+
data,
|
88
|
+
[
|
89
|
+
("A1", self.env.company, 111, 0),
|
90
|
+
],
|
91
|
+
)
|
92
|
+
|
93
|
+
def test_read_group_internal(self):
|
94
|
+
"""Test a regular _read_group without date filtering still works."""
|
95
|
+
data = self.thing_model._read_group(
|
96
|
+
domain=[],
|
97
|
+
groupby=["account_code", "company_id"],
|
98
|
+
aggregates=["debit:sum", "credit:sum"],
|
99
|
+
)
|
100
|
+
self.assertEqual(
|
101
|
+
data,
|
102
|
+
[
|
103
|
+
("A1", self.env.company, 218, 0),
|
104
|
+
],
|
105
|
+
)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2
2
|
<odoo>
|
3
|
-
<record model="ir.ui.view" id="
|
4
|
-
<field name="name">mis.report.view.
|
3
|
+
<record model="ir.ui.view" id="mis_report_view_list">
|
4
|
+
<field name="name">mis.report.view.list</field>
|
5
5
|
<field name="model">mis.report</field>
|
6
6
|
<field name="arch" type="xml">
|
7
|
-
<
|
7
|
+
<list>
|
8
8
|
<field name="name" />
|
9
9
|
<field name="description" />
|
10
|
-
</
|
10
|
+
</list>
|
11
11
|
</field>
|
12
12
|
</record>
|
13
13
|
|
@@ -31,7 +31,7 @@
|
|
31
31
|
colspan="2"
|
32
32
|
context="{'default_report_id': id}"
|
33
33
|
>
|
34
|
-
<
|
34
|
+
<list>
|
35
35
|
<field name="sequence" widget="handle" />
|
36
36
|
<field name="description" />
|
37
37
|
<field name="name" />
|
@@ -45,7 +45,7 @@
|
|
45
45
|
invisible="type == 'str'"
|
46
46
|
/>
|
47
47
|
<field name="expression" />
|
48
|
-
</
|
48
|
+
</list>
|
49
49
|
</field>
|
50
50
|
</page>
|
51
51
|
<page string="Queries">
|
@@ -55,7 +55,7 @@
|
|
55
55
|
colspan="2"
|
56
56
|
context="{'default_report_id': id}"
|
57
57
|
>
|
58
|
-
<
|
58
|
+
<list editable="bottom">
|
59
59
|
<field name="name" />
|
60
60
|
<field name="model_id" />
|
61
61
|
<field
|
@@ -70,16 +70,16 @@
|
|
70
70
|
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"
|
71
71
|
/>
|
72
72
|
<field name="domain" />
|
73
|
-
</
|
73
|
+
</list>
|
74
74
|
</field>
|
75
75
|
</page>
|
76
76
|
<page string="Sub KPI's">
|
77
77
|
<field name="subkpi_ids" nolabel="1" colspan="2">
|
78
|
-
<
|
78
|
+
<list editable="bottom">
|
79
79
|
<field name="sequence" widget="handle" />
|
80
80
|
<field name="description" />
|
81
81
|
<field name="name" />
|
82
|
-
</
|
82
|
+
</list>
|
83
83
|
</field>
|
84
84
|
</page>
|
85
85
|
<page string="Sub Reports">
|
@@ -89,13 +89,13 @@
|
|
89
89
|
colspan="2"
|
90
90
|
context="{'default_report_id': id}"
|
91
91
|
>
|
92
|
-
<
|
92
|
+
<list editable="bottom">
|
93
93
|
<field name="name" />
|
94
94
|
<field
|
95
95
|
name="subreport_id"
|
96
96
|
domain="[('id', '!=', parent.id)]"
|
97
97
|
/>
|
98
|
-
</
|
98
|
+
</list>
|
99
99
|
</field>
|
100
100
|
</page>
|
101
101
|
</notebook>
|
@@ -132,13 +132,13 @@
|
|
132
132
|
nolabel="1"
|
133
133
|
invisible="not multi"
|
134
134
|
>
|
135
|
-
<
|
135
|
+
<list editable="bottom">
|
136
136
|
<field
|
137
137
|
name="subkpi_id"
|
138
138
|
domain="[('report_id', '=', parent.report_id)]"
|
139
139
|
/>
|
140
140
|
<field name="name" />
|
141
|
-
</
|
141
|
+
</list>
|
142
142
|
</field>
|
143
143
|
<field
|
144
144
|
name="expression"
|
@@ -166,36 +166,31 @@
|
|
166
166
|
<p
|
167
167
|
> The following special elements are recognized in the expressions
|
168
168
|
to compute accounting data: <code
|
169
|
-
|
169
|
+
>{bal|crd|deb|pbal|nbal}{pieu}[account
|
170
170
|
selector][journal items domain]</code>. </p>
|
171
171
|
<ul>
|
172
172
|
<li>
|
173
173
|
<code>bal</code>, <code>crd</code>, <code
|
174
|
-
|
175
|
-
pbal</code>, <code
|
176
|
-
|
177
|
-
positive balance, negative balance
|
178
|
-
other numerical field. </li>
|
174
|
+
>deb</code>, <code>
|
175
|
+
pbal</code>, <code
|
176
|
+
>nbal</code> : balance, debit, credit,
|
177
|
+
positive balance, negative balance. </li>
|
179
178
|
<li>
|
180
179
|
<code>p</code>, <code>i</code>, <code
|
181
|
-
|
180
|
+
>e</code> : respectively variation over the period,
|
182
181
|
initial balance, ending balance </li>
|
183
|
-
<li>when <code
|
184
|
-
>fld</code> is used : a field name specifier
|
185
|
-
must be provided (e.g. <code
|
186
|
-
>fldp.quantity</code></li>
|
187
182
|
<li> The <b
|
188
|
-
|
183
|
+
>account selector</b> is a like expression on the
|
189
184
|
account code (eg <code
|
190
|
-
|
185
|
+
>70%</code>, etc), or a domain over accounts
|
191
186
|
(eg <code
|
192
|
-
|
187
|
+
>[('code', 'like', '60%')]</code>). </li>
|
193
188
|
<li> The <b
|
194
|
-
|
189
|
+
>journal items domain</b> is an Odoo domain filter on
|
195
190
|
journal items. </li>
|
196
191
|
<li>
|
197
192
|
<code>balu[]</code> : (<code
|
198
|
-
|
193
|
+
>u</code> for unallocated) is a special expression
|
199
194
|
that shows the unallocated profit/loss of previous fiscal
|
200
195
|
years. </li>
|
201
196
|
</ul>
|
@@ -203,7 +198,7 @@
|
|
203
198
|
Expressions can involve other KPI, sub KPI and
|
204
199
|
query results by name (eg <code>kpi1 + kpi2</code>,
|
205
200
|
<code>kpi2.subkpi1</code>, <code
|
206
|
-
|
201
|
+
>query1.field1</code>).
|
207
202
|
</p>
|
208
203
|
<p>
|
209
204
|
Additionally following variables are available
|
@@ -217,15 +212,15 @@
|
|
217
212
|
similar to the python builtins. </li>
|
218
213
|
<li>
|
219
214
|
<code>datetime</code>, <code
|
220
|
-
|
221
|
-
|
215
|
+
>datetime</code>, <code
|
216
|
+
>dateutil</code> : the python modules. </li>
|
222
217
|
<li>
|
223
218
|
<code>date_from</code>, <code
|
224
|
-
|
219
|
+
>date_to</code> : beginning and end date of the
|
225
220
|
period. </li>
|
226
221
|
<li>
|
227
222
|
<code
|
228
|
-
|
223
|
+
>AccountingNone</code> : a null value that behaves as 0 in
|
229
224
|
arithmetic operations. </li>
|
230
225
|
</ul>
|
231
226
|
</div>
|
@@ -234,19 +229,19 @@
|
|
234
229
|
<ul>
|
235
230
|
<li>
|
236
231
|
<code
|
237
|
-
|
232
|
+
>bal[70]</code> : variation of the balance of account 70 over
|
238
233
|
the period (it is the same as <code
|
239
|
-
|
234
|
+
>balp[70]</code>. </li>
|
240
235
|
<li>
|
241
236
|
<code
|
242
|
-
|
237
|
+
>bali[70,60]</code> : initial balance of accounts 70 and 60. </li>
|
243
238
|
<li>
|
244
239
|
<code
|
245
|
-
|
240
|
+
>bale[1%%]</code> : balance of accounts starting with 1 at
|
246
241
|
end of period. </li>
|
247
242
|
<li>
|
248
243
|
<code
|
249
|
-
|
244
|
+
>crdp[40%]</code> : sum of all credits on accounts starting
|
250
245
|
with 40 during the period. </li>
|
251
246
|
<li>
|
252
247
|
<code>
|
@@ -270,7 +265,7 @@
|
|
270
265
|
: balance of move lines related to tax grid 56. </li>
|
271
266
|
<li>
|
272
267
|
<code
|
273
|
-
|
268
|
+
>pbale[55%]</code> : sum of all ending balances of accounts
|
274
269
|
starting with 55 whose ending balance is positive. </li>
|
275
270
|
</ul>
|
276
271
|
</div>
|
@@ -282,9 +277,9 @@
|
|
282
277
|
</record>
|
283
278
|
<record model="ir.actions.act_window" id="mis_report_view_action">
|
284
279
|
<field name="name">MIS Report Templates</field>
|
285
|
-
<field name="view_id" ref="
|
280
|
+
<field name="view_id" ref="mis_report_view_list" />
|
286
281
|
<field name="res_model">mis.report</field>
|
287
|
-
<field name="view_mode">
|
282
|
+
<field name="view_mode">list,form</field>
|
288
283
|
</record>
|
289
284
|
<menuitem
|
290
285
|
id="mis_report_conf_menu"
|
@@ -22,11 +22,11 @@
|
|
22
22
|
</form>
|
23
23
|
</field>
|
24
24
|
</record>
|
25
|
-
<record model="ir.ui.view" id="
|
26
|
-
<field name="name">mis.report.instance.view.
|
25
|
+
<record model="ir.ui.view" id="mis_report_instance_view_list">
|
26
|
+
<field name="name">mis.report.instance.view.list</field>
|
27
27
|
<field name="model">mis.report.instance</field>
|
28
28
|
<field name="arch" type="xml">
|
29
|
-
<
|
29
|
+
<list>
|
30
30
|
<button
|
31
31
|
type="object"
|
32
32
|
name="preview"
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<field name="currency_id" groups="base.group_multi_currency" />
|
48
48
|
<field name="target_move" />
|
49
49
|
<field name="pivot_date" />
|
50
|
-
</
|
50
|
+
</list>
|
51
51
|
</field>
|
52
52
|
</record>
|
53
53
|
<record model="ir.ui.view" id="mis_report_instance_view_form">
|
@@ -136,9 +136,7 @@
|
|
136
136
|
<group>
|
137
137
|
<field name="date" />
|
138
138
|
</group>
|
139
|
-
<group
|
140
|
-
|
141
|
-
</group>
|
139
|
+
<group />
|
142
140
|
<field
|
143
141
|
name="period_ids"
|
144
142
|
nolabel="1"
|
@@ -146,15 +144,14 @@
|
|
146
144
|
required="comparison_mode"
|
147
145
|
context="{'default_report_instance_id': id}"
|
148
146
|
>
|
149
|
-
<
|
147
|
+
<list decoration-danger="not valid">
|
150
148
|
<field name="sequence" widget="handle" />
|
151
149
|
<field name="name" />
|
152
150
|
<field name="source" />
|
153
151
|
<field name="source_aml_model_id" />
|
154
152
|
<field name="date_from" />
|
155
153
|
<field name="date_to" />
|
156
|
-
|
157
|
-
</tree>
|
154
|
+
</list>
|
158
155
|
</field>
|
159
156
|
</group>
|
160
157
|
</page>
|
@@ -215,9 +212,9 @@
|
|
215
212
|
</record>
|
216
213
|
<record model="ir.actions.act_window" id="mis_report_instance_view_action">
|
217
214
|
<field name="name">MIS Reports</field>
|
218
|
-
<field name="view_id" ref="
|
215
|
+
<field name="view_id" ref="mis_report_instance_view_list" />
|
219
216
|
<field name="res_model">mis.report.instance</field>
|
220
|
-
<field name="view_mode">
|
217
|
+
<field name="view_mode">list,form</field>
|
221
218
|
<field name="domain">[('temporary', '=', False)]</field>
|
222
219
|
</record>
|
223
220
|
<menuitem
|
@@ -253,42 +250,42 @@
|
|
253
250
|
<sheet position="after">
|
254
251
|
<footer>
|
255
252
|
<button
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
253
|
+
type="object"
|
254
|
+
name="save_report"
|
255
|
+
string="Save"
|
256
|
+
icon="fa-save"
|
257
|
+
class="btn"
|
258
|
+
/>
|
262
259
|
<button
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
260
|
+
type="object"
|
261
|
+
name="preview"
|
262
|
+
string="Preview"
|
263
|
+
icon="fa-search"
|
264
|
+
class="btn"
|
265
|
+
/>
|
269
266
|
<button
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
267
|
+
type="object"
|
268
|
+
name="print_pdf"
|
269
|
+
string="Print"
|
270
|
+
icon="fa-print"
|
271
|
+
class="btn"
|
272
|
+
/>
|
276
273
|
<button
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
274
|
+
type="object"
|
275
|
+
name="export_xls"
|
276
|
+
string="Export"
|
277
|
+
icon="fa-download"
|
278
|
+
class="btn"
|
279
|
+
/> or <button string="Cancel" class="oe_link" special="cancel" />
|
283
280
|
</footer>
|
284
281
|
</sheet>
|
285
282
|
</field>
|
286
283
|
</record>
|
287
284
|
<record model="ir.actions.act_window" id="last_mis_report_instance_view_action">
|
288
285
|
<field name="name">Last Reports Generated</field>
|
289
|
-
<field name="view_id" ref="
|
286
|
+
<field name="view_id" ref="mis_report_instance_view_list" />
|
290
287
|
<field name="res_model">mis.report.instance</field>
|
291
|
-
<field name="view_mode">
|
288
|
+
<field name="view_mode">list,form</field>
|
292
289
|
<field name="domain">[('temporary', '=', True)]</field>
|
293
290
|
</record>
|
294
291
|
<menuitem
|
@@ -337,14 +334,14 @@
|
|
337
334
|
nolabel="1"
|
338
335
|
colspan="2"
|
339
336
|
>
|
340
|
-
<
|
337
|
+
<list editable="bottom">
|
341
338
|
<field name="sign" />
|
342
339
|
<field
|
343
340
|
name="period_to_sum_id"
|
344
341
|
domain="[('report_instance_id', '=', parent.report_instance_id), ('id', '!=', parent.id)]"
|
345
342
|
options="{'no_create': True, 'no_open': True}"
|
346
343
|
/>
|
347
|
-
</
|
344
|
+
</list>
|
348
345
|
</field>
|
349
346
|
<field
|
350
347
|
name="source_sumcol_accdet"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2
2
|
<odoo>
|
3
|
-
<record model="ir.ui.view" id="
|
4
|
-
<field name="name">mis.report.style.view.
|
3
|
+
<record model="ir.ui.view" id="mis_report_style_view_list">
|
4
|
+
<field name="name">mis.report.style.view.list</field>
|
5
5
|
<field name="model">mis.report.style</field>
|
6
6
|
<field name="arch" type="xml">
|
7
|
-
<
|
7
|
+
<list>
|
8
8
|
<field name="name" />
|
9
|
-
</
|
9
|
+
</list>
|
10
10
|
</field>
|
11
11
|
</record>
|
12
12
|
<record id="mis_report_style_view_form" model="ir.ui.view">
|
@@ -62,9 +62,9 @@
|
|
62
62
|
</record>
|
63
63
|
<record model="ir.actions.act_window" id="mis_report_style_view_action">
|
64
64
|
<field name="name">MIS Report Styles</field>
|
65
|
-
<field name="view_id" ref="
|
65
|
+
<field name="view_id" ref="mis_report_style_view_list" />
|
66
66
|
<field name="res_model">mis.report.style</field>
|
67
|
-
<field name="view_mode">
|
67
|
+
<field name="view_mode">list,form</field>
|
68
68
|
</record>
|
69
69
|
<menuitem
|
70
70
|
id="mis_report_style_view_menu"
|
@@ -46,8 +46,8 @@ class AddMisReportInstanceDashboard(models.TransientModel):
|
|
46
46
|
.sudo()
|
47
47
|
.create(
|
48
48
|
{
|
49
|
-
"name": "mis.report.instance.result.view.action
|
50
|
-
|
49
|
+
"name": f"mis.report.instance.result.view.action."
|
50
|
+
f"{self.env.context['active_id']}",
|
51
51
|
"res_model": active_model,
|
52
52
|
"res_id": active_id,
|
53
53
|
"target": "current",
|
@@ -67,7 +67,7 @@ class AddMisReportInstanceDashboard(models.TransientModel):
|
|
67
67
|
)
|
68
68
|
arch = self.dashboard_id.view_id.arch
|
69
69
|
if last_customization:
|
70
|
-
arch =
|
70
|
+
arch = last_customization[0].arch
|
71
71
|
new_arch = etree.fromstring(arch)
|
72
72
|
column = new_arch.xpath("//column")[0]
|
73
73
|
# Due to native dashboard doesn't support form view
|