Index: openacs-4/packages/invoices/www/invoice-documents.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-documents.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/invoices/www/invoice-documents.tcl 27 Oct 2006 17:08:23 -0000 1.3 +++ openacs-4/packages/invoices/www/invoice-documents.tcl 1 Nov 2006 14:27:56 -0000 1.4 @@ -8,6 +8,7 @@ {opening_p 0} {invoice_p 1} {copy_p 0} + {odt_p 0} {file_ids ""} {return_url:optional ""} {display_p 1} @@ -65,6 +66,13 @@ # (opening, invoice/credit/cancellation, copy) set documents [iv::invoice::parse_data -invoice_id $invoice_id -types $document_types -email_text ""] +# We want to get the odt file only +if {$odt_p} { + set file [lindex $documents 1] + ad_returnredirect [export_vars -base "invoice.odt" -url {file}] + ad_script_abort +} + multirow create documents file_id file_title file_url set files {} set documents [lreplace $documents 0 0]