Skip to content

Commit 74e2eca

Browse files
committed
[REF] mis_builder_cash_flow: Allow to override query
1 parent 8138924 commit 74e2eca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mis_builder_cash_flow/report/mis_cash_flow.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def _selection_parent_state(self):
5555
"selection"
5656
]
5757

58-
def init(self):
59-
query = """
58+
def _init_query(self):
59+
return """
6060
SELECT
6161
-- we use negative id to avoid duplicates and we don't use
6262
-- ROW_NUMBER() because the performance was very poor
@@ -108,6 +108,9 @@ def init(self):
108108
fl.date as date
109109
FROM mis_cash_flow_forecast_line as fl
110110
"""
111+
112+
def init(self):
113+
query = self._init_query()
111114
tools.drop_view_if_exists(self.env.cr, self._table)
112115
self._cr.execute(
113116
"CREATE OR REPLACE VIEW %s AS (%s)", (AsIs(self._table), AsIs(query))

0 commit comments

Comments
 (0)