2010-09-17 06:06:32 +00:00
|
|
|
-
|
2010-09-17 13:57:42 +00:00
|
|
|
In order to test the PDF reports defined on a l10n_fr, we will print an Account Move Line Report for l10n_fr
|
2010-09-17 06:06:32 +00:00
|
|
|
-
|
|
|
|
!python {model: account.move.line}: |
|
2013-02-09 06:49:48 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
2014-04-22 13:13:33 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [], 'l10n_fr.report_l10nfrbilan', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {})
|
2010-09-17 06:06:32 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2010-09-17 13:57:42 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan_report.'+format), 'wb+').write(data)
|
2010-09-17 06:06:32 +00:00
|
|
|
|
|
|
|
-
|
2010-09-17 13:57:42 +00:00
|
|
|
In order to test the PDF reports defined on a l10n_fr, we will print a Compute Resultant Report for l10n_fr
|
2010-09-17 06:06:32 +00:00
|
|
|
-
|
|
|
|
!python {model: account.move.line}: |
|
2013-02-09 06:29:29 +00:00
|
|
|
import os
|
2013-02-22 13:35:11 +00:00
|
|
|
import openerp.report
|
|
|
|
from openerp import tools
|
2014-04-22 13:13:33 +00:00
|
|
|
data, format = openerp.report.render_report(cr, uid, [], 'l10n_fr.report_l10nfrresultat', {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {})
|
2010-09-17 06:06:32 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2010-09-17 13:57:42 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant_report.'+format), 'wb+').write(data)
|