diff --git a/src/report/report-system/report-system.scm b/src/report/report-system/report-system.scm index 55486824ee..48cc2b76ff 100644 --- a/src/report/report-system/report-system.scm +++ b/src/report/report-system/report-system.scm @@ -106,8 +106,10 @@ (export gnc:define-report) (export ) (export gnc:report-template-new-options/name) +(export gnc:report-template-new-options/report-guid) (export gnc:report-template-menu-name/name) (export gnc:report-template-renderer/name) +(export gnc:report-template-renderer/report-guid) (export gnc:report-template-new-options) (export gnc:report-template-version) (export gnc:report-template-name) @@ -137,6 +139,7 @@ (export gnc:report-set-ctext!) (export gnc:make-report) (export gnc:restore-report) +(export gnc:restore-report-by-guid) (export gnc:make-report-options) (export gnc:report-export-types) (export gnc:report-export-thunk) diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm index 3df716b46e..0dc7a730e8 100644 --- a/src/report/report-system/report.scm +++ b/src/report/report-system/report.scm @@ -47,7 +47,7 @@ (define (make-record-type "" ;; The data items in a report record - '(version name options-generator + '(version name report-guid parent-type options-generator options-cleanup-cb options-changed-cb renderer in-menu? menu-path menu-name menu-tip export-types export-thunk))) @@ -65,6 +65,8 @@ ((record-constructor ) #f ;; version #f ;; name + #f ;; report-guid for backwards compat of newer reports + #f ;; parent-type for backwards compat of newer reports #f ;; options-generator #f ;; options-cleanup-cb #f ;; options-changed-cb @@ -138,6 +140,10 @@ (gnc:report-template-new-options templ) #f))) +;; dummy function to enable backwards compatibility of newer reports +(define (gnc:report-template-new-options/report-guid template-id template-name) + (gnc:report-template-new-options/name template-name)) + (define (gnc:report-template-menu-name/name template-name) (let ((templ (hash-ref *gnc:_report-templates_* template-name))) (if templ @@ -151,6 +157,10 @@ (gnc:report-template-renderer templ) #f))) +;; dummy function to enable backwards compatibility of newer reports +(define (gnc:report-template-renderer/report-guid template-id template-name) + (gnc:report-template-renderer/name template-name)) + (define (gnc:report-template-new-options report-template) (let ((generator (gnc:report-template-options-generator report-template)) (namer @@ -277,6 +287,10 @@ (gnc-report-add r)) ) +;; dummy function to enable backwards compatibility with newer reports +(define (gnc:restore-report-by-guid id template-id template-name options) + (gnc:restore-report id template-name options)) + (define (gnc:make-report-options template-name) (let ((template (hash-ref *gnc:_report-templates_* template-name)))