diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm index beed4d6312..804846e125 100644 --- a/src/report/report-system/report.scm +++ b/src/report/report-system/report.scm @@ -525,12 +525,24 @@ #f "(let ((options (gnc:report-template-new-options/report-guid ~S ~S)))\n" (gnc:report-type report) (gnc:report-template-name (hash-ref *gnc:_report-templates_* (gnc:report-type report)))) (gnc:generate-restore-forms (gnc:report-options report) "options") + ;; 2.6->2.4 compatibility code prefix + ;; Temporary check to make the new report saving code more or less backwards + ;; compatible with older gnucash versions. This can be removed again in 2.8. + "(if (defined? 'gnc:restore-report-by-guid-with-custom-template)\n" + ;; end of 2.6->2.4 compatibility code prefix. (format - #f " (gnc:restore-report-by-guid-with-custom-template ~S ~S ~S ~S options))\n" + #f " (gnc:restore-report-by-guid-with-custom-template ~S ~S ~S ~S options)\n" (gnc:report-id report) (gnc:report-type report) (gnc:report-template-name (hash-ref *gnc:_report-templates_* (gnc:report-type report))) - (gnc:report-custom-template report) - ))) + (gnc:report-custom-template report)) + ;; 2.6->2.4 compatibility code suffix + (format + #f " (gnc:restore-report-by-guid ~S ~S ~S options))\n" + (gnc:report-id report) (gnc:report-type report) + (gnc:report-template-name (hash-ref *gnc:_report-templates_* (gnc:report-type report)))) + ;; end of 2.6->2.4 compatibility code suffix. + ")" + )) ;; Loop over embedded reports and concat result of each gnc:report-generate-restore-forms (define (gnc:report-generate-options-embedded report)