Skip to content

Commit 55f8c3c

Browse files
committed
[IMP] mis_builder: Add journal filter to report instance
1 parent a5bbcb1 commit 55f8c3c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

mis_builder/models/mis_report_instance.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ def _compute_pivot_date(self):
527527
string="Allowed companies",
528528
help="Select companies for which data will be searched.",
529529
)
530+
journal_ids = fields.Many2many(
531+
comodel_name="account.journal",
532+
string="Journals",
533+
help="Select journals to be included in the report.",
534+
)
530535
query_company_ids = fields.Many2many(
531536
string="Effective companies",
532537
comodel_name="res.company",
@@ -751,6 +756,8 @@ def _get_filter_domain(self, source_aml_model_name):
751756
# company filter
752757
if self.query_company_ids:
753758
domain.append(("company_id", "in", self.query_company_ids.ids))
759+
if self.journal_ids:
760+
domain.append(("journal_id", "in", self.journal_ids.ids))
754761
return domain
755762

756763
@api.model

mis_builder/report/mis_report_instance_qweb.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
t-if="first_cell and notes.get(first_cell.cell_id)"
119119
>
120120
<t
121-
t-out="notes[first_cell.cell_id].text"
121+
t-out="notes[first_cell.cell_id]['text']"
122122
/>
123123
</t>
124124
</div>

mis_builder/views/mis_report_instance.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
widget="many2many_tags"
176176
invisible="not multi_company"
177177
/>
178+
<field name="journal_ids" widget="many2many_tags"/>
178179
<field
179180
name="query_company_ids"
180181
groups="base.group_multi_company"

0 commit comments

Comments
 (0)