[IMP] hr_payroll : yml report test added

bzr revid: rme@rme-desktop-20100915121956-un2ft2e7e8nvuqbj
This commit is contained in:
RME 2010-09-15 17:49:56 +05:30
parent 6ccc0c7027
commit 5e87554754
3 changed files with 20 additions and 41 deletions

View File

@ -1,41 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Module Technical Guide in Restructured Text ',
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """
* This module generate the Technical Guides of selected modules in Restructured Text format (RST)
* It uses the Sphinx (http://sphinx.pocoo.org) implementation of RST
* It creates a tarball (.tgz file suffix) containing an index file and one file per module
* Generate Relationship Graph
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'update_xml': ['base_module_doc_rst_view.xml', 'base_module_doc_rst_wizard.xml', 'module_report.xml'],
'demo_xml': [],
'installable': True,
'certificate': '',
}

View File

@ -60,6 +60,7 @@
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
'test/hr_payroll_report.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'

View File

@ -0,0 +1,19 @@
-
In order to test the PDF reports defined on a HR Employee Salary, we will print a HR Employee Salary
-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_emp_salary_report.'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a HR Payslip, we will print a HR Payslip
-
!python {model: hr.payslip}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payslip_report.'+format), 'wb+').write(data)
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})