From 50e73399ec63c5929feb5caa66ec9f79d78578bf Mon Sep 17 00:00:00 2001 From: Quentin Date: Tue, 20 Jan 2009 12:56:53 +0100 Subject: [PATCH] [IMP] splitted the printing of the invoice into 2 reports (using same rml): print preview and final printing bzr revid: qdp@jade-20090120115653-mmuuvkeqwa7tjxai --- addons/account/account_report.xml | 9 ++++++++- addons/account/report/invoice.py | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 98929af59a8..86ebc080ce3 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -15,9 +15,16 @@ model="account.invoice" name="account.invoice" rml="account/report/invoice.rml" - string="Invoices" + string="Final Print" attachment="(object.state in ('open','paid')) and (time.strftime('%Y-%m-%d')+'-'+object.number)" attachment_use="1"/> + diff --git a/addons/account/report/invoice.py b/addons/account/report/invoice.py index 5916b988ef8..34aab596d0f 100644 --- a/addons/account/report/invoice.py +++ b/addons/account/report/invoice.py @@ -36,3 +36,9 @@ report_sxw.report_sxw( parser=account_invoice ) +report_sxw.report_sxw( + 'report.account.invoice.preview', + 'account.invoice', + 'addons/account/report/invoice.rml', + parser=account_invoice +)