From 5e8755475498efbdaf8f9b48f6a14c121bf7f2a9 Mon Sep 17 00:00:00 2001 From: RME Date: Wed, 15 Sep 2010 17:49:56 +0530 Subject: [PATCH] [IMP] hr_payroll : yml report test added bzr revid: rme@rme-desktop-20100915121956-un2ft2e7e8nvuqbj --- addons/base_module_doc_rst/__terp__.py | 41 -------------------- addons/hr_payroll/__openerp__.py | 1 + addons/hr_payroll/test/hr_payroll_report.yml | 19 +++++++++ 3 files changed, 20 insertions(+), 41 deletions(-) delete mode 100644 addons/base_module_doc_rst/__terp__.py create mode 100644 addons/hr_payroll/test/hr_payroll_report.yml diff --git a/addons/base_module_doc_rst/__terp__.py b/addons/base_module_doc_rst/__terp__.py deleted file mode 100644 index 8a7fe96b6bd..00000000000 --- a/addons/base_module_doc_rst/__terp__.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -{ - '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': '', -} - diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py index b7886da2df0..ab814ed80c2 100644 --- a/addons/hr_payroll/__openerp__.py +++ b/addons/hr_payroll/__openerp__.py @@ -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' diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml new file mode 100644 index 00000000000..4d3fda41de7 --- /dev/null +++ b/addons/hr_payroll/test/hr_payroll_report.yml @@ -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')], {}, {}) +