From 3c055a769fc22e5fdc71ab9dc5a48237dd6d1812 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 27 Apr 2015 14:19:02 +0200 Subject: [PATCH] [FIX] account: Taxes report The Tax Report printed with details should not include draft accounting entries. Technicaly, the account move lines include in a draft account move do not have to be printed opw:633642 --- addons/account/report/account_tax_report.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py index b3cbcb441bf..91b1514ba2a 100644 --- a/addons/account/report/account_tax_report.py +++ b/addons/account/report/account_tax_report.py @@ -143,15 +143,18 @@ class tax_report(report_sxw.rml_parse, common_report_header): account.name AS name, \ account.code AS code \ FROM account_move_line AS line, \ - account_account AS account \ + account_account AS account, \ + account_move as move \ WHERE line.state <> %s \ + AND line.move_id = move.id \ AND line.tax_code_id = %s \ AND line.account_id = account.id \ AND account.company_id = %s \ AND line.period_id IN %s\ AND account.active \ + AND move.state <> %s \ GROUP BY account.id,account.name,account.code', ('draft', tax_code_id, - company_id, periods_ids,)) + company_id, periods_ids, 'draft',)) res = self.cr.dictfetchall() i = 0