flectra/addons/l10n_fr/test/l10n_fr_report.yml
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

20 lines
1.1 KiB
YAML

-
In order to test the PDF reports defined on a l10n_fr, we will print an Account Move Line Report for l10n_fr
-
!python {model: account.move.line, id: False}: |
import os
from odoo import tools
data, format = self.env.ref('l10n_fr.report_l10nfrbilan').render([], data={'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}})
if tools.config['test_report_directory']:
open(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a l10n_fr, we will print a Compute Resultant Report for l10n_fr
-
!python {model: account.move.line}: |
import os
from odoo import tools
data, format = self.env.ref('l10n_fr.report_l10nfrresultat').render([], data={'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}})
if tools.config['test_report_directory']:
open(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant_report.'+format), 'wb+').write(data)