[report] deprecate report-without-guid handling

This commit is contained in:
Christopher Lam 2019-02-27 18:55:15 +08:00
parent 0f8558b7f8
commit b8e9ce3318
2 changed files with 3 additions and 0 deletions

View File

@ -141,6 +141,8 @@ not found.")))
(begin (begin
(if (gnc:report-template-name report-rec) (if (gnc:report-template-name report-rec)
(begin (begin
(issue-deprecation-warning
"report-definition without guid is deprecated. please define report with guid.")
;; we've got an old style report with no report-id, give it an arbitrary one ;; we've got an old style report with no report-id, give it an arbitrary one
(gnc:report-template-set-report-guid! report-rec (guid-new-return)) (gnc:report-template-set-report-guid! report-rec (guid-new-return))

View File

@ -36,6 +36,7 @@
;; ----------------------------------------------------------------------- ;; -----------------------------------------------------------------------
(define (test-check2) (define (test-check2)
;; this tests deprecated features
(display "\n*** Missing GUID detection:\n") (display "\n*** Missing GUID detection:\n")
(gnc:define-report 'version "1" (gnc:define-report 'version "1"
'name "Test Report Template") 'name "Test Report Template")