[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
This commit is contained in:
Goffin Simon 2015-04-27 14:19:02 +02:00
parent 3e7d3c7ee4
commit 3c055a769f
1 changed files with 5 additions and 2 deletions

View File

@ -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