From 4189aff7743ec3710a805a72b82d425e1a87c4a9 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 7 Feb 2019 17:30:38 +0100 Subject: [PATCH] [FIX] account_financial_report: Incorrect SQL query for cost centers --- account_financial_report_qweb/report/general_ledger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_financial_report_qweb/report/general_ledger.py b/account_financial_report_qweb/report/general_ledger.py index 4a6b6606..83dee086 100644 --- a/account_financial_report_qweb/report/general_ledger.py +++ b/account_financial_report_qweb/report/general_ledger.py @@ -1621,7 +1621,7 @@ WITH move_lines_on_tags AS if self.filter_cost_center_ids: query_select_previous_fy_unaffected_earnings += """ INNER JOIN account_analytic_account aa - ON aml.analytic_account_id = aa.id + ON ml.analytic_account_id = aa.id AND aa.id IN %(cost_center_ids)s """ query_select_previous_fy_unaffected_earnings_params[ @@ -1677,7 +1677,7 @@ WITH move_lines_on_tags AS if self.filter_cost_center_ids: query_select_period_unaffected_earnings += """ INNER JOIN account_analytic_account aa - ON aml.analytic_account_id = aa.id + ON ml.analytic_account_id = aa.id AND aa.id IN %(cost_center_ids)s """ query_select_period_unaffected_earnings_params[