Hi,

thanks for reply!

Mon, 1 Feb 2016 12:53:42 +0100
Sergi Almacellas Abellana <[email protected]>:
>El 29/01/16 a les 18:52, Cédric Krier ha escrit:
>> I think by using this way [1] of writing reports the problem is
>> solved because report are just there to layout the data.

Moving the report complexity to a SQL-query for a specific model of
report lines is a good idea. I guess it should be possible to add data
for the report and to check the report results in a scenario test
using proteus, since it is just a list of objects.

>One some of our reports we use a similar way, separting into two
>methods the report generation:
>- First method computes the report data [2]
>- Second method generates the report with the data computed from first 
>method [3]
>Using unittest [4] we ensure that data is correctly computed, without 
>using proteus and without rendering the report.

Yes, it is a good idea, too, to separate the report preparation from
execution for testing. But by using unittest I have the problem of
setting up the data needed for the report with unittest test cases.
This I would like to avoid.

Thanks!
Regards Udo

>[2] 
>https://bitbucket.org/trytonspain/trytond-account_jasper_reports/src/c9102e9651f4629a7f224fa0a2b15cca13846037/general_ledger.py?fileviewer=file-view-default#general_ledger.py-116
>[3] 
>https://bitbucket.org/trytonspain/trytond-account_jasper_reports/src/c9102e9651f4629a7f224fa0a2b15cca13846037/general_ledger.py?fileviewer=file-view-default#general_ledger.py-267
>[4] 
>https://bitbucket.org/trytonspain/trytond-account_jasper_reports/src/c9102e9651f4629a7f224fa0a2b15cca13846037/tests/test_account_jasper_reports.py?at=default&fileviewer=file-view-default#test_account_jasper_reports.py-407
>> [1] https://bugs.tryton.org/issue4996

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20160202190846.0b90ecdf%40bender.dsl.

Attachment: pgp1LJNT6Mzmm.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to