From 6ccc0c702766796a1d49606a1faf2fd027a0725b Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Wed, 15 Sep 2010 17:45:34 +0530 Subject: [PATCH 01/54] [IMP] account : testing for yml report added bzr revid: ach@tinyerp.com-20100915121534-xo7hpvzfluu2rrse --- addons/account/__openerp__.py | 1 + addons/account/test/account_report.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 addons/account/test/account_report.yml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index c432689de44..9bbddb1e050 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -134,6 +134,7 @@ module named account_voucher. 'test/account_use_model.yml', 'test/account_validate_account_move.yml', 'test/account_fiscalyear_close.yml', + 'test/account_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml new file mode 100644 index 00000000000..ae7424dc968 --- /dev/null +++ b/addons/account/test/account_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on an invoice, we will print an invoice +- + !python {model: account.invoice}: | + print "aavoyuygugvyuvyug " + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'invoice.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a partner, we will print a overdue report +- + !python {model: res.partner}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c'),ref('base.res_partner_sednacom'),ref('base.res_partner_thymbra'),ref('base.res_partner_desertic_hispafuentes'),ref('base.res_partner_tinyatwork'),ref('base.res_partner_2'),ref('base.res_partner_3'),ref('base.res_partner_4'),ref('base.res_partner_5'),ref('base.res_partner_6'),ref('base.res_partner_maxtor'),ref('base.res_partner_seagate'),ref('base.res_partner_8'),ref('base.res_partner_9'),ref('base.res_partner_10'),ref('base.res_partner_11'),ref('base.res_partner_14'),ref('base.res_partner_15'),ref('base.res_partner_accent')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'overdue.'+format), 'wb+').write(data) \ No newline at end of file From 5e8755475498efbdaf8f9b48f6a14c121bf7f2a9 Mon Sep 17 00:00:00 2001 From: RME Date: Wed, 15 Sep 2010 17:49:56 +0530 Subject: [PATCH 02/54] [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')], {}, {}) + From 342d27536f000628e768c5f529fe08b02213d612 Mon Sep 17 00:00:00 2001 From: RME Date: Wed, 15 Sep 2010 17:51:50 +0530 Subject: [PATCH 03/54] [FIX] base_module_doc_rst : __openerp__ file added bzr revid: rme@rme-desktop-20100915122150-24iglp5i0rd2kc7l --- addons/base_module_doc_rst/__openerp__.py | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 addons/base_module_doc_rst/__openerp__.py diff --git a/addons/base_module_doc_rst/__openerp__.py b/addons/base_module_doc_rst/__openerp__.py new file mode 100644 index 00000000000..8a7fe96b6bd --- /dev/null +++ b/addons/base_module_doc_rst/__openerp__.py @@ -0,0 +1,41 @@ +# -*- 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': '', +} + From 59d97f99ff944536217ac2ffa93d754e0754941a Mon Sep 17 00:00:00 2001 From: RME Date: Wed, 15 Sep 2010 17:59:58 +0530 Subject: [PATCH 04/54] [IMP] hr_expense : yml report test added bzr revid: rme@rme-desktop-20100915122958-99dz5gqeqppcq6as --- addons/hr_expense/__openerp__.py | 4 +++- addons/hr_expense/test/hr_expense_report.yml | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 addons/hr_expense/test/hr_expense_report.yml diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py index aa45f4aa888..fe06b0110c2 100644 --- a/addons/hr_expense/__openerp__.py +++ b/addons/hr_expense/__openerp__.py @@ -55,7 +55,9 @@ 'demo_xml': [ 'hr_expense_demo.xml', ], - 'test': ['test/test_hr_expense.yml'], + 'test': ['test/test_hr_expense.yml', + 'test/hr_expense_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0062479841789', diff --git a/addons/hr_expense/test/hr_expense_report.yml b/addons/hr_expense/test/hr_expense_report.yml new file mode 100644 index 00000000000..52a44e0dafb --- /dev/null +++ b/addons/hr_expense/test/hr_expense_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a HR Expense, we will print a HR Expense +- + !python {model: hr.expense.expense}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.hr.expense').create(cr, uid, [ref('hr_expense.hr_expense_expense_septemberexpenses0'),ref('hr_expense.hr_expense_expense_septemberexpenses1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_expense_report.'+format), 'wb+').write(data) \ No newline at end of file From 67fe69cc61a622996d30b34d8a28508ec4071703 Mon Sep 17 00:00:00 2001 From: "DHS (OpenERP)" Date: Wed, 15 Sep 2010 18:04:52 +0530 Subject: [PATCH 05/54] [IMP] lunch,mrp,mrp_operations,mrp_repair : yml report test added bzr revid: dhs@tinyerp.com-20100915123452-odrbked6wcx0wg60 --- addons/lunch/__openerp__.py | 5 ++-- addons/lunch/test/lunch_report.yml | 8 ++++++ addons/mrp/__openerp__.py | 3 ++- addons/mrp/test/mrp_report.yml | 26 +++++++++++++++++++ addons/mrp_operations/__openerp__.py | 2 +- .../test/mrp_operations_report.yml | 17 ++++++++++++ addons/mrp_repair/__openerp__.py | 10 +++---- addons/mrp_repair/test/mrp_repair_report.yml | 8 ++++++ 8 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 addons/lunch/test/lunch_report.yml create mode 100644 addons/mrp/test/mrp_report.yml create mode 100644 addons/mrp_operations/test/mrp_operations_report.yml create mode 100644 addons/mrp_repair/test/mrp_repair_report.yml diff --git a/addons/lunch/__openerp__.py b/addons/lunch/__openerp__.py index ab540ad10d3..2e5c2489339 100644 --- a/addons/lunch/__openerp__.py +++ b/addons/lunch/__openerp__.py @@ -49,9 +49,8 @@ 'report/report_lunch_order_view.xml', ], "demo_xml": ['lunch_demo.xml'], - "test": ['test/test_lunch.yml'], + "test": ['test/test_lunch.yml', 'test/lunch_report.yml'], "installable": True, } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/lunch/test/lunch_report.yml b/addons/lunch/test/lunch_report.yml new file mode 100644 index 00000000000..76214dfb599 --- /dev/null +++ b/addons/lunch/test/lunch_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a lunch, we will print a lunch order +- + !python {model: lunch.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lunch.order').create(cr, uid, [ref('lunch.lunch_order_0'),ref('lunch.lunch_order_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'lunch-lunch_order.'+format), 'wb+').write(data) diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index f8630065598..c56466501e0 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -92,7 +92,8 @@ 'test/mrp_packs.yml', 'test/mrp_phantom_bom.yml', 'test/mrp_production_order.yml', - + 'test/mrp_report.yml', + ], 'installable': True, 'active': False, diff --git a/addons/mrp/test/mrp_report.yml b/addons/mrp/test/mrp_report.yml new file mode 100644 index 00000000000..5c619e0b09d --- /dev/null +++ b/addons/mrp/test/mrp_report.yml @@ -0,0 +1,26 @@ +- + In order to test the PDF reports defined on a mrp, we will print a bom order +- + !python {model: mrp.bom}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [ref('mrp.mrp_bom_0'),ref('mrp.mrp_bom_1'),ref('mrp.mrp_bom_2'),ref('mrp.mrp_bom_23'),ref('mrp.mrp_bom_1901'),ref('mrp.mrp_bom_assemblysection0'),ref('mrp.mrp_bom_sidepanel0'),ref('mrp.mrp_bom_defaultbomforshelfofcm1'),ref('mrp.mrp_bom_sidepanel3')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_order.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a mrp, we will print a order +- + !python {model: mrp.production}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref('mrp.mrp_production_mo1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a mrp, we will print a (mrp)Product-price order +- + !python {model: product.product}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [ref('product.product_product_0'), ref('product.product_product_pc2'), ref('product.product_product_cpu1'), ref('product.product_product_hdd1'), ref('product.product_product_fan'), ref('product.product_product_cpu1'), ref('product.product_product_ram512')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-production-price_order.'+format), 'wb+').write(data) diff --git a/addons/mrp_operations/__openerp__.py b/addons/mrp_operations/__openerp__.py index d4d5cf98d08..5170cc4c627 100644 --- a/addons/mrp_operations/__openerp__.py +++ b/addons/mrp_operations/__openerp__.py @@ -61,7 +61,7 @@ 'process/mrp_operation_process.xml' ], 'demo_xml': ['mrp_operation_data.xml'], - 'test': ['test/mrp_operations.yml'], + 'test': ['test/mrp_operations.yml', 'test/mrp_operations_report.yml'], 'installable': True, 'active': False, 'certificate': '0056233813133', diff --git a/addons/mrp_operations/test/mrp_operations_report.yml b/addons/mrp_operations/test/mrp_operations_report.yml new file mode 100644 index 00000000000..c83d077acde --- /dev/null +++ b/addons/mrp_operations/test/mrp_operations_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on a mrp operations, we will print a barcode +- + !python {model: mrp_operations.operation.code}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.code.barcode').create(cr, uid, [ref('mrp_operations.mrp_op_1'),ref('mrp_operations.mrp_op_2'),ref('mrp_operations.mrp_op_3'),ref('mrp_operations.mrp_op_4'),ref('mrp_operations.mrp_op_5')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_operations-barcoder.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a mrp operations, we will print a workcenters +- + !python {model: mrp.workcenter}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.mrp.wc.barcode').create(cr, uid, [ref('mrp.mrp_workcenter_0'),ref('mrp.mrp_workcenter_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_ workcenter.'+format), 'wb+').write(data) diff --git a/addons/mrp_repair/__openerp__.py b/addons/mrp_repair/__openerp__.py index c9a4068f925..4313ae1a062 100644 --- a/addons/mrp_repair/__openerp__.py +++ b/addons/mrp_repair/__openerp__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## @@ -31,13 +31,13 @@ * Invoicing (products and/or services) * Warranty concept * Repair quotation report - * Notes for the technician and for the final customer + * Notes for the technician and for the final customer """, 'author': 'OpenERP SA', 'depends': ['mrp', 'sale', 'account'], 'update_xml': [ 'security/ir.model.access.csv', - 'mrp_repair_sequence.xml', + 'mrp_repair_sequence.xml', 'wizard/mrp_repair_cancel_view.xml', 'wizard/mrp_repair_make_invoice_view.xml', 'mrp_repair_view.xml', @@ -45,7 +45,7 @@ 'mrp_repair_report.xml', ], 'demo_xml': [], - 'test': ['test/test_mrp_repair.yml'], + 'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml'], 'installable': True, 'active': False, 'certificate': '0060814381277', diff --git a/addons/mrp_repair/test/mrp_repair_report.yml b/addons/mrp_repair/test/mrp_repair_report.yml new file mode 100644 index 00000000000..b6eb782dcfe --- /dev/null +++ b/addons/mrp_repair/test/mrp_repair_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a mrp-repair, we will print a order +- + !python {model: mrp.repair}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rma0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp-repair_order.'+format), 'wb+').write(data) From f27fd64c9bd6e68b2a43d6fdea4db17f93a50933 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Wed, 15 Sep 2010 18:07:15 +0530 Subject: [PATCH 06/54] [IMP] sale : yml test for report added bzr revid: jma@tinyerp.com-20100915123715-trcmdqutp9i34tcw --- addons/sale/__openerp__.py | 1 + addons/sale/test/sale_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 addons/sale/test/sale_report.yml diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index 2bcb2f2d88f..eb108373201 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -80,6 +80,7 @@ 'test/invoice_on_ordered_qty.yml', 'test/invoice_on_shipped_qty.yml', 'test/sale_order_print.yml', + 'test/sale_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/sale/test/sale_report.yml b/addons/sale/test/sale_report.yml new file mode 100644 index 00000000000..6453d52f658 --- /dev/null +++ b/addons/sale/test/sale_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a sale order, we will print a report for sale prepare allot +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order.prepare.allot').create(cr, uid, [ref('sale.order'),ref('sale.order2'),ref('sale.order3')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale-sale_prepare_allot.'+format), 'wb+').write(data) \ No newline at end of file From 346dcab5edce3e3f365b936dbbb0d3b841915e10 Mon Sep 17 00:00:00 2001 From: RME Date: Wed, 15 Sep 2010 18:22:20 +0530 Subject: [PATCH 07/54] [IMP] acution : yml report test added bzr revid: rme@rme-desktop-20100915125220-7yvku6txipfi9xlo --- addons/auction/__openerp__.py | 4 +++- addons/auction/test/auction_report.yml | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 addons/auction/test/auction_report.yml diff --git a/addons/auction/__openerp__.py b/addons/auction/__openerp__.py index 69fef0748c4..7105102b385 100644 --- a/addons/auction/__openerp__.py +++ b/addons/auction/__openerp__.py @@ -59,7 +59,9 @@ ], 'demo_xml': ['auction_demo.xml','board_auction_demo.xml'], - 'test': ['test/auction.yml'], + 'test': ['test/auction.yml', + 'test/auction_report.yml', + ], 'installable': True, 'active': False, diff --git a/addons/auction/test/auction_report.yml b/addons/auction/test/auction_report.yml new file mode 100644 index 00000000000..6b4a4fe97ed --- /dev/null +++ b/addons/auction/test/auction_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on a Action Artist, we will print a Action Artist +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.artists').create(cr, uid, [ref('auction.auction_deposit_1_lot_1'),ref('auction.auction_deposit_1_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'action_artist_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Action Bid, we will print a Action Bid +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.bids').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'action_bid_report.'+format), 'wb+').write(data) \ No newline at end of file From 49787ee415ee57a82a114e63184511021f3c03ac Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Wed, 15 Sep 2010 18:29:09 +0530 Subject: [PATCH 08/54] [IMP] stock : yml test for report added bzr revid: jma@tinyerp.com-20100915125909-73pmcxjgii1nhr00 --- addons/stock/__openerp__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index e33e347d612..e961c49333a 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -74,7 +74,12 @@ Thanks to the double entry management, the inventory controlling is powerful and "security/ir.model.access.csv", "board_warehouse_view.xml" ], - 'test': ['test/stock_test.yml'], + 'test': ['test/stock_test.yml', + 'test/stock_inventory_move_report.yml', + 'test/stock_lot_location_report.yml', + 'test/stock_overview_report.yml', + 'test/stock_overviewall_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0055421559965', From 47a8c0f1bb4f285a6cb2179d57c95940ceb57d2c Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Wed, 15 Sep 2010 18:35:05 +0530 Subject: [PATCH 09/54] [IMP] stock : yml test for report added bzr revid: jma@tinyerp.com-20100915130505-j3ye9qdvvrjje6ec --- addons/stock/test/stock_inventory_move_report.yml | 8 ++++++++ addons/stock/test/stock_lot_location_report.yml | 8 ++++++++ addons/stock/test/stock_overview_report.yml | 8 ++++++++ addons/stock/test/stock_overviewall_report.yml | 8 ++++++++ 4 files changed, 32 insertions(+) create mode 100644 addons/stock/test/stock_inventory_move_report.yml create mode 100644 addons/stock/test/stock_lot_location_report.yml create mode 100644 addons/stock/test/stock_overview_report.yml create mode 100644 addons/stock/test/stock_overviewall_report.yml diff --git a/addons/stock/test/stock_inventory_move_report.yml b/addons/stock/test/stock_inventory_move_report.yml new file mode 100644 index 00000000000..a92db995427 --- /dev/null +++ b/addons/stock/test/stock_inventory_move_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report +- + !python {model: stock.inventory}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.stock_inventory_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_lot_location_report.yml b/addons/stock/test/stock_lot_location_report.yml new file mode 100644 index 00000000000..d31bdf620d4 --- /dev/null +++ b/addons/stock/test/stock_lot_location_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on stock location, we will print a lot location report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overview_report.yml b/addons/stock/test/stock_overview_report.yml new file mode 100644 index 00000000000..22d75625a63 --- /dev/null +++ b/addons/stock/test/stock_overview_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a stock, we will print a Stock Overview report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overviewall_report.yml b/addons/stock/test/stock_overviewall_report.yml new file mode 100644 index 00000000000..8f3bb61d044 --- /dev/null +++ b/addons/stock/test/stock_overviewall_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) From b0dfb8e3adc5c36df025970d8e25ff62fa580bc4 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Wed, 15 Sep 2010 19:55:39 +0530 Subject: [PATCH 10/54] [IMP] auction: added yml for report test bzr revid: ach@tinyerp.com-20100915142539-0ypa4adhrkpi91dz --- addons/account/test/account_report.yml | 1 - addons/auction/test/auction_report.yml | 90 ++++++++++++++++++++++++-- 2 files changed, 86 insertions(+), 5 deletions(-) diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index ae7424dc968..a883af0506c 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -2,7 +2,6 @@ In order to test the PDF reports defined on an invoice, we will print an invoice - !python {model: account.invoice}: | - print "aavoyuygugvyuvyug " import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) if tools.config['test_report_directory']: diff --git a/addons/auction/test/auction_report.yml b/addons/auction/test/auction_report.yml index 6b4a4fe97ed..4adbbae5fe9 100644 --- a/addons/auction/test/auction_report.yml +++ b/addons/auction/test/auction_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on a Action Artist, we will print a Action Artist + In order to test the PDF reports defined on auction, we will print a Action Artist - !python {model: auction.lots}: | import netsvc, tools, os @@ -8,10 +8,92 @@ file(os.path.join(tools.config['test_report_directory'], 'action_artist_report.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a Action Bid, we will print a Action Bid + In order to test the PDF reports defined on auction, we will print a Action Bid - - !python {model: auction.lots}: | + !python {model: auction.bid}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.auction.bids').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'action_bid_report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'action_bid_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print a Seller Form Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.seller_form_report').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'seller_form_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print a lots list Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lots.list').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'lots_list_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print a lots inventory Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lots.list.inventory').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'lots_inventory_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print a deposit seller Report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.deposit.seller').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'deposit_seller_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print a catalog +- + !python {model: auction.dates}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.cat_flagy').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-catalog_list.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print buyer form report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.buyer_form_report').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-buyer_form.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on auction, we will print bids phones report +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bids.phones.details').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'auction-bids_phones_details.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a auction, we will print a Auction Total +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.total.rml').create(cr, uid, [ref('auction.auction_deposit_2_lot_1'),ref('auction.auction_deposit_2_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'action_total_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Result +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.auction.result').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_3_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'action_result_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a auction, we will print a Auction Lot +- + !python {model: auction.lots}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.bids.lots').create(cr, uid, [ref('auction.auction_deposit_4_lot_1'),ref('auction.auction_deposit_4_lot_2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'action_lot_report.'+format), 'wb+').write(data) \ No newline at end of file From e566a9d4a8cfe2e45f3f7aef4cb823f05db28b54 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Wed, 15 Sep 2010 20:34:37 +0530 Subject: [PATCH 11/54] [IMP] purchase : yml test for purchase & demo data added bzr revid: jma@tinyerp.com-20100915150437-qd4aaem5kkscselt --- addons/purchase/purchase_demo.xml | 58 ++++++++++++++++++++++++ addons/purchase/test/purchase_report.yml | 8 ++++ 2 files changed, 66 insertions(+) create mode 100644 addons/purchase/test/purchase_report.yml diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml index 1168fd29679..f6c2931a626 100644 --- a/addons/purchase/purchase_demo.xml +++ b/addons/purchase/purchase_demo.xml @@ -1,6 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + 2010/09/15 + New server config + material + + + 150 + 5 + make_to_stock + + + + + 2010/09/15 + [PC1] Basic PC + + + 450 + 2 + 3 + 3 + make_to_stock + + + + + 2010/09/15 + [PC3] Medium PC + + + 900 + 1 + make_to_stock + + + + \ No newline at end of file diff --git a/addons/purchase/test/purchase_report.yml b/addons/purchase/test/purchase_report.yml new file mode 100644 index 00000000000..b98d1f212ac --- /dev/null +++ b/addons/purchase/test/purchase_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Purchase Order, we will print a Request Quotation report +- + !python {model: purchase.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.quotation').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase-request_quotation'+format), 'wb+').write(data) From e983503c6653585154a7beeba39d90cbc33363a4 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 11:10:15 +0530 Subject: [PATCH 12/54] [IMP] Account : Added yml test for aged partner balance report bzr revid: jvo@tinyerp.com-20100916054015-vqg00y3oa2uqglsx --- addons/account/test/account_report.yml | 32 +++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index a883af0506c..639e571f674 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -5,12 +5,38 @@ import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'invoice.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) + - - In order to test the PDF reports defined on a partner, we will print a overdue report + In order to test the PDF reports defined on a partner, we will print the Overdue Report - !python {model: res.partner}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c'),ref('base.res_partner_sednacom'),ref('base.res_partner_thymbra'),ref('base.res_partner_desertic_hispafuentes'),ref('base.res_partner_tinyatwork'),ref('base.res_partner_2'),ref('base.res_partner_3'),ref('base.res_partner_4'),ref('base.res_partner_5'),ref('base.res_partner_6'),ref('base.res_partner_maxtor'),ref('base.res_partner_seagate'),ref('base.res_partner_8'),ref('base.res_partner_9'),ref('base.res_partner_10'),ref('base.res_partner_11'),ref('base.res_partner_14'),ref('base.res_partner_15'),ref('base.res_partner_accent')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'overdue.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data) + +- + Print the Aged Partner Balance Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + res = {} + for i in range(5)[::-1]: + stop = start - RelativeDateTime(days=30) + res[str(i)] = { + 'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))), + 'stop': start.strftime('%Y-%m-%d'), + 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False), + } + start = stop - RelativeDateTime(days=1) + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_balance': 1, 'periods': [], 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : 'True', 'id': 1,'result_selection': 'customer','direction_selection': 'past'}} + data_dict['form'].update(res) + (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-aged_partner_balance.'+format), 'wb+').write(data) + \ No newline at end of file From a9c3dbcd3d1cea38e62737deb8c85bd5e347a334 Mon Sep 17 00:00:00 2001 From: "RME (OpenERP)" Date: Thu, 16 Sep 2010 11:18:00 +0530 Subject: [PATCH 13/54] [IMP] acution : yml report test added bzr revid: rme@tinyerp.com-20100916054800-jgtvkzc560qiu3eu --- addons/auction/test/auction_report.yml | 33 ++++++++++---------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/addons/auction/test/auction_report.yml b/addons/auction/test/auction_report.yml index 4adbbae5fe9..4d5110c03a1 100644 --- a/addons/auction/test/auction_report.yml +++ b/addons/auction/test/auction_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on auction, we will print a Action Artist + In order to test the PDF reports defined on auction, we will print a auction artist - !python {model: auction.lots}: | import netsvc, tools, os @@ -8,27 +8,20 @@ file(os.path.join(tools.config['test_report_directory'], 'action_artist_report.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on auction, we will print a Action Bid + In order to test the PDF reports defined on auction, we will print a auction Bid - !python {model: auction.bid}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.auction.bids').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'action_bid_report.'+format), 'wb+').write(data) -- - In order to test the PDF reports defined on auction, we will print a Seller Form Report -- - !python {model: auction.lots}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.seller_form_report').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'seller_form_report.'+format), 'wb+').write(data) + - In order to test the PDF reports defined on auction, we will print a lots list Report - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lots.list').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + (data, format) = netsvc.LocalService('report.lots.list').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_3_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'lots_list_report.'+format), 'wb+').write(data) - @@ -36,7 +29,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lots.list.inventory').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + (data, format) = netsvc.LocalService('report.lots.list.inventory').create(cr, uid, [ref('auction.auction_deposit_4_lot_1'),ref('auction.auction_deposit_4_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'lots_inventory_report.'+format), 'wb+').write(data) - @@ -44,7 +37,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.deposit.seller').create(cr, uid, [ref('auction.auction_date_1_bid_3'),ref('auction.auction_date_1_bid_4')], {}, {}) + (data, format) = netsvc.LocalService('report.deposit.seller').create(cr, uid, [ref('auction.auction_deposit_5_lot_1'),ref('auction.auction_deposit_5_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'deposit_seller_report.'+format), 'wb+').write(data) - @@ -52,7 +45,7 @@ - !python {model: auction.dates}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.auction.cat_flagy').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + (data, format) = netsvc.LocalService('report.auction.cat_flagy').create(cr, uid, [ref('auction.auction_date_1'),ref('auction.auction_date_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'auction-catalog_list.'+format), 'wb+').write(data) - @@ -60,7 +53,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.buyer_form_report').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + (data, format) = netsvc.LocalService('report.buyer_form_report').create(cr, uid, [ref('auction.auction_deposit_6_lot_1'),ref('auction.auction_deposit_6_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'auction-buyer_form.'+format), 'wb+').write(data) - @@ -68,7 +61,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.bids.phones.details').create(cr, uid, [ref('auction.auction_date_2')], {}, {}) + (data, format) = netsvc.LocalService('report.bids.phones.details').create(cr, uid, [ref('auction.auction_deposit_7_lot_1'),ref('auction.auction_deposit_7_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'auction-bids_phones_details.'+format), 'wb+').write(data) - @@ -76,7 +69,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.auction.total.rml').create(cr, uid, [ref('auction.auction_deposit_2_lot_1'),ref('auction.auction_deposit_2_lot_2')], {}, {}) + (data, format) = netsvc.LocalService('report.auction.total.rml').create(cr, uid, [ref('auction.auction_deposit_8_lot_1'),ref('auction.auction_deposit_8_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'action_total_report.'+format), 'wb+').write(data) @@ -85,7 +78,7 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.auction.result').create(cr, uid, [ref('auction.auction_deposit_3_lot_1'),ref('auction.auction_deposit_3_lot_2')], {}, {}) + (data, format) = netsvc.LocalService('report.auction.result').create(cr, uid, [ref('auction.auction_deposit_9_lot_1'),ref('auction.auction_deposit_9_lot_2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'action_result_report.'+format), 'wb+').write(data) @@ -94,6 +87,6 @@ - !python {model: auction.lots}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.bids.lots').create(cr, uid, [ref('auction.auction_deposit_4_lot_1'),ref('auction.auction_deposit_4_lot_2')], {}, {}) + (data, format) = netsvc.LocalService('report.bids.lots').create(cr, uid, [ref('auction.auction_deposit_10_lot_1'),ref('auction.auction_deposit_10_lot_2')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'action_lot_report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'action_lot_report.'+format), 'wb+').write(data) \ No newline at end of file From e268102b8d5c4b1e7d8e6dc39d8c77b0b04743bb Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 14:03:41 +0530 Subject: [PATCH 14/54] [IMP] Account : Added yml report test for account balance landscape report bzr revid: jvo@tinyerp.com-20100916083341-lsf0o0tar99zn3rb --- addons/account/test/account_report.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 639e571f674..b2429628b7c 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -39,4 +39,24 @@ (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-aged_partner_balance.'+format), 'wb+').write(data) - \ No newline at end of file + +- + Print the Account Balance Report in Landscape mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [], data_dict, {'periods': [1, 83, 2, 3, 4, 5, 6, 7, 8, 9]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance.'+format), 'wb+').write(data) + +- + Print the Account Balance Report in Landscape mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [], data_dict, {'periods': [1, 83, 2, 3, 4, 5, 6, 7, 8, 9]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance.'+format), 'wb+').write(data) + \ No newline at end of file From a084c489671adc9e7f143540183e491be4afcd1a Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 14:33:39 +0530 Subject: [PATCH 15/54] [IMP] point_of_sale : yml test for point_of_sale & demo data added bzr revid: jma@tinyerp.com-20100916090339-v7765dg7rgs1nd1s --- addons/point_of_sale/__openerp__.py | 3 +- addons/point_of_sale/pos_demo.xml | 61 +++++++++++++++++++++++- addons/point_of_sale/test/pos_report.yml | 53 ++++++++++++++++++++ 3 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 addons/point_of_sale/test/pos_report.yml diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index cab0fb40dc0..351fc7ef733 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -73,7 +73,8 @@ Main features : 'statement_report.xml', ], 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',], - 'test':['test/pos_test.yml',], + 'test':['test/pos_test.yml', + 'test/pos_report.yml'], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/pos_demo.xml b/addons/point_of_sale/pos_demo.xml index 14710cf8f37..80ba3d24397 100644 --- a/addons/point_of_sale/pos_demo.xml +++ b/addons/point_of_sale/pos_demo.xml @@ -1,6 +1,65 @@ - + + + + + + + + + tax_excluded + + + + + + + + + tax_excluded + + + + + + + + 2010/09/15 + [PC3] Medium PC + + + + 450 + 2 + No Discount + + + + + 2010/09/15 + [PC2] Basic+ PC (assembly on order) + + + + 450 + 2 + No Discount + + + + + 2010/09/15 + [PC1] Basic PC + + + + 450 + 5 + 0.10 + Discount Applied + + diff --git a/addons/point_of_sale/test/pos_report.yml b/addons/point_of_sale/test/pos_report.yml new file mode 100644 index 00000000000..bd89ca2015d --- /dev/null +++ b/addons/point_of_sale/test/pos_report.yml @@ -0,0 +1,53 @@ +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Detail Summary report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.details_summary').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.lines').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt With Reimbursement report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt.with.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt with reimbursement report'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a point of sale, we will print a POS Receipt Without Reimbursement report +- + !python {model: pos.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data) \ No newline at end of file From 9a239296dda89cc0b312384904830e7a5009ee0e Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 15:03:29 +0530 Subject: [PATCH 16/54] [IMP] product : yml report test for product added bzr revid: jma@tinyerp.com-20100916093329-zwqovzfx671mdcdy --- addons/product/__openerp__.py | 1 + addons/product/test/product_report.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 addons/product/test/product_report.yml diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 0a0cfceff20..5d099489859 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -58,6 +58,7 @@ 'company_view.xml', 'process/product_process.xml' ], + 'test':['test/product_report.yml'], 'installable': True, 'active': False, 'certificate': '0068861431437', diff --git a/addons/product/test/product_report.yml b/addons/product/test/product_report.yml new file mode 100644 index 00000000000..9ff387278aa --- /dev/null +++ b/addons/product/test/product_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on Products, we will print a Products Pricelists report +- + !python {model: product.product}: | + import netsvc, tools, os + data_dict = {'model': 'product.price_list'} + data_dict['form'] = { + 'qty1': 1, + 'qty2': 5, + 'qty3': 10, + 'qty4': 0, + 'qty5': 0, + 'price_list':ref('product.list0') + } + (data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'product-product pricelist'+format), 'wb+').write(data) From 9deb5b1ca995534fcc171939afa3a3c928d8a580 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 16:19:35 +0530 Subject: [PATCH 17/54] [IMP/FIX] Account : More yml test for reports bzr revid: jvo@tinyerp.com-20100916104935-xe97uoo2f3n5cwlt --- .../account/report/account_balance_sheet.py | 2 +- addons/account/test/account_report.yml | 37 +++++++++++++++---- .../account_report_balance_sheet_view.xml | 1 + 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index ce02d7938f9..e4d624af5d8 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -78,7 +78,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header): db_pool = pooler.get_pool(self.cr.dbname) #Getting Profit or Loss Balance from profit and Loss report - result_pl=self.obj_pl.get_data(data) + result_pl = self.obj_pl.get_data(data) self.res_bl = self.obj_pl.final_result() type_pool = db_pool.get('account.account.type') diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index b2429628b7c..903a80dc805 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -34,7 +34,7 @@ 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False), } start = stop - RelativeDateTime(days=1) - data_dict = {'model': 'ir.ui.menu', 'form': {'initial_balance': 1, 'periods': [], 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : 'True', 'id': 1,'result_selection': 'customer','direction_selection': 'past'}} + data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': [], 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : 'True', 'id': 1,'result_selection': 'customer','direction_selection': 'past'}} data_dict['form'].update(res) (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: @@ -45,18 +45,39 @@ - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'account.account', 'form': {'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all'}} - (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [], data_dict, {'periods': [1, 83, 2, 3, 4, 5, 6, 7, 8, 9]}) + data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-account_balance.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-landscape.'+format), 'wb+').write(data) - - Print the Account Balance Report in Landscape mode + Print the Account Balance Sheet in Hotizontal mode - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'account.account', 'form': {'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all'}} - (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [], data_dict, {'periods': [1, 83, 2, 3, 4, 5, 6, 7, 8, 9]}) + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-account_balance.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data) + +- + Print the Account Balance Sheet in Normal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all'}} + (data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data) + +- + Print the Account Balance Report in Normal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) + \ No newline at end of file diff --git a/addons/account/wizard/account_report_balance_sheet_view.xml b/addons/account/wizard/account_report_balance_sheet_view.xml index 1f337ca6bb9..113521604ae 100644 --- a/addons/account/wizard/account_report_balance_sheet_view.xml +++ b/addons/account/wizard/account_report_balance_sheet_view.xml @@ -11,6 +11,7 @@ + From 4afe3947c4edca7781a18a3765e92c4f439d495f Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 16:46:02 +0530 Subject: [PATCH 18/54] [IMP] purchase_requisition : yml test report & demo data added bzr revid: jma@tinyerp.com-20100916111602-5gl2ik7zbfhozr17 --- addons/purchase_requisition/__openerp__.py | 4 +-- .../purchase_requisition_demo.xml | 27 +++++++++++++++++++ .../test/purchase_requisition_report.yml | 8 ++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 addons/purchase_requisition/purchase_requisition_demo.xml create mode 100644 addons/purchase_requisition/test/purchase_requisition_report.yml diff --git a/addons/purchase_requisition/__openerp__.py b/addons/purchase_requisition/__openerp__.py index 27be1f3ce64..7594fdcb96b 100644 --- a/addons/purchase_requisition/__openerp__.py +++ b/addons/purchase_requisition/__openerp__.py @@ -30,7 +30,7 @@ """, "depends" : ["purchase","mrp"], "init_xml" : [], - "demo_xml" : [], + "demo_xml" : ['purchase_requisition_demo.xml'], "update_xml" : ["wizard/purchase_requisition_partner_view.xml", "purchase_requisition_data.xml", "purchase_requisition_view.xml", @@ -38,7 +38,7 @@ "security/ir.model.access.csv","purchase_requisition_sequence.xml" ], "active": False, - "test":[], + "test":['purchase_requisition_report.yml'], "installable": True } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml new file mode 100644 index 00000000000..ff9bba7c700 --- /dev/null +++ b/addons/purchase_requisition/purchase_requisition_demo.xml @@ -0,0 +1,27 @@ + + + + + + + + TE0001 + + multiple + 2010/09/16 15:56:14 + + + + + + + + + + 5 + + + + + + \ No newline at end of file diff --git a/addons/purchase_requisition/test/purchase_requisition_report.yml b/addons/purchase_requisition/test/purchase_requisition_report.yml new file mode 100644 index 00000000000..73edfe18054 --- /dev/null +++ b/addons/purchase_requisition/test/purchase_requisition_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Purchase Requisition, we will print a Requisition report +- + !python {model: purchase.requisition}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.requisition').create(cr, uid, [ref('purchase_requisition.order_purchase_requisition1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition- purchase requisition report.'+format), 'wb+').write(data) From ef537daedcb09e70ac4ae12fc5308206c02a6410 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 17:09:52 +0530 Subject: [PATCH 19/54] [IMP] report_instratat : yml test report added bzr revid: jma@tinyerp.com-20100916113952-50dtf0kv7ce9g66r --- addons/report_intrastat/__openerp__.py | 1 + addons/report_intrastat/test/report_instratat_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 addons/report_intrastat/test/report_instratat_report.yml diff --git a/addons/report_intrastat/__openerp__.py b/addons/report_intrastat/__openerp__.py index 16860ef9b70..ca421627ff5 100644 --- a/addons/report_intrastat/__openerp__.py +++ b/addons/report_intrastat/__openerp__.py @@ -37,6 +37,7 @@ 'intrastat_report.xml' ], 'demo_xml': [], + 'test': ['report_instratat_report.yml'], 'installable': True, 'active': False, 'certificate': '0056982189085', diff --git a/addons/report_intrastat/test/report_instratat_report.yml b/addons/report_intrastat/test/report_instratat_report.yml new file mode 100644 index 00000000000..821ce528cfd --- /dev/null +++ b/addons/report_intrastat/test/report_instratat_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined using report_instratat module, we print a Instratat Report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice.intrastat').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat report.'+format), 'wb+').write(data) From 15549773ea573d5ddc04aac9a8d277844cc982f1 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 17:35:21 +0530 Subject: [PATCH 20/54] [IMP/FIX] Account : More yml test for reports bzr revid: jvo@tinyerp.com-20100916120521-oddmrks30kdvbqfe --- addons/account/test/account_report.yml | 27 +++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 903a80dc805..67db2dc628f 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -45,7 +45,7 @@ - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.account_fiscalyear_fiscalyear0')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} + data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-landscape.'+format), 'wb+').write(data) @@ -55,7 +55,7 @@ - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all'}} + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} (data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data) @@ -65,7 +65,7 @@ - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all'}} + data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} (data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data) @@ -75,9 +75,26 @@ - !python {model: account.account}: | import netsvc, tools, os, time - data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.account_fiscalyear_fiscalyear0') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}} + data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.data_fiscalyear') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}} (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) - \ No newline at end of file +- + Print the Central Journal Report +- + !python {model: account.journal.period}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) + + data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True','target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} + (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) + + + + \ No newline at end of file From 1d6c6b4ffcca592390b3ef9045074328201f49cf Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 17:45:38 +0530 Subject: [PATCH 21/54] [IMP] sale_layout : yml test report added bzr revid: jma@tinyerp.com-20100916121538-gd0h3if1gjsbrvj2 --- addons/sale_layout/__openerp__.py | 1 + addons/sale_layout/test/sale_layout_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 addons/sale_layout/test/sale_layout_report.yml diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py index ee9fdadf8c3..898915b6d99 100755 --- a/addons/sale_layout/__openerp__.py +++ b/addons/sale_layout/__openerp__.py @@ -40,6 +40,7 @@ "sale_layout_view.xml", "sale_layout_report.xml", ], + "test" : ['sale_layout_report.yml'], "active": False, "installable": True } diff --git a/addons/sale_layout/test/sale_layout_report.yml b/addons/sale_layout/test/sale_layout_report.yml new file mode 100644 index 00000000000..ed43ac639f6 --- /dev/null +++ b/addons/sale_layout/test/sale_layout_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Sale, we will print a Sale Layout report. +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order.layout').create(cr, uid, [ref('sale.order')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale_layout-sale layout report'+format), 'wb+').write(data) From ba148dba0a21f895b698801ff35158d80e08989d Mon Sep 17 00:00:00 2001 From: "RME (OpenERP)" Date: Thu, 16 Sep 2010 17:59:49 +0530 Subject: [PATCH 22/54] [IMP] hr_attendance, hr_timesheet_invoice, hr_payroll : yml report test added bzr revid: rme@tinyerp.com-20100916122949-gisdwwxrjc7xia6t --- addons/hr_attendance/__openerp__.py | 2 +- .../hr_attendance/test/hr_attendance_error.yml | 9 +++++++++ addons/hr_payroll/test/hr_payroll_report.yml | 18 ++++++++++++++++++ addons/hr_timesheet_invoice/__openerp__.py | 4 +++- .../test/hr_timesheet_invoice_report.yml | 9 +++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 addons/hr_attendance/test/hr_attendance_error.yml create mode 100644 addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml diff --git a/addons/hr_attendance/__openerp__.py b/addons/hr_attendance/__openerp__.py index 5a79566bcde..9ed2b76e1ed 100644 --- a/addons/hr_attendance/__openerp__.py +++ b/addons/hr_attendance/__openerp__.py @@ -43,7 +43,7 @@ 'wizard/hr_attendance_sign_in_out_view.xml', ], 'demo_xml': ['hr_attendance_demo.xml'], - 'test': ['test/test_hr_attendance.yml'], + 'test': ['test/test_hr_attendance.yml','test/hr_attendance_error.yml'], 'installable': True, 'active': False, 'certificate': '0063495605613', diff --git a/addons/hr_attendance/test/hr_attendance_error.yml b/addons/hr_attendance/test/hr_attendance_error.yml new file mode 100644 index 00000000000..6c045871cb5 --- /dev/null +++ b/addons/hr_attendance/test/hr_attendance_error.yml @@ -0,0 +1,9 @@ +- + In order to test the PDF reports defined on a hr attendance error, we will print a hr attendance error +- + !python {model: hr.employee}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [], {'model': 'hr.employee', 'form': {'init_date': '2010-09-16', 'end_date': '2010-09-16', 'id': 1, 'emp_ids': [ref('hr.employee2')], 'max_delay': 120}} + , {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml index 4d3fda41de7..88a797b6827 100644 --- a/addons/hr_payroll/test/hr_payroll_report.yml +++ b/addons/hr_payroll/test/hr_payroll_report.yml @@ -17,3 +17,21 @@ 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')], {}, {}) +- + Print the employee salary details +- + !python {model: hr.payslip}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': [ref('hr.employee2')]}} + (data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detai_report.'+format), 'wb+').write(data) +- + Print the employee yearly salary details +- + !python {model: hr.payslip}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': [ref('hr.employee2')]}} + (data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detai_report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/__openerp__.py b/addons/hr_timesheet_invoice/__openerp__.py index f9be64cc454..df44302ec56 100644 --- a/addons/hr_timesheet_invoice/__openerp__.py +++ b/addons/hr_timesheet_invoice/__openerp__.py @@ -47,7 +47,9 @@ reports, eso.""", ], 'demo_xml': ['hr_timesheet_invoice_demo.xml', ], - 'test': ['test/test_hr_timesheet_invoice.yml'], + 'test': ['test/test_hr_timesheet_invoice.yml' + 'test/hr_timesheet_invoice_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0056091842381', diff --git a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml new file mode 100644 index 00000000000..434d04a979d --- /dev/null +++ b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml @@ -0,0 +1,9 @@ +- + In order to test the PDF reports defined on a hr timesheet invoice, we will print a hr timesheet invoice +- + !python {model: account.analytic.line}: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'id': 1, 'date_from': '2010-09-01', 'employee_ids': [[6, 0, [1, ref('hr.employee2')]]], 'journal_ids': [[6, 0, [1, 2, 3, 4]]], 'date_to': '2010-09-16'}} + (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-report.'+format), 'wb+').write(data) \ No newline at end of file From 3d2f1f17e50ebc6f254db8d91f8584fc485e70de Mon Sep 17 00:00:00 2001 From: "RME (OpenERP)" Date: Thu, 16 Sep 2010 18:28:50 +0530 Subject: [PATCH 23/54] [IMP] survey : yml report test added bzr revid: rme@tinyerp.com-20100916125850-pad2rt5je7ocvhxn --- addons/survey/__openerp__.py | 1 + addons/survey/test/survey_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 addons/survey/test/survey_report.yml diff --git a/addons/survey/__openerp__.py b/addons/survey/__openerp__.py index 853370132de..fa48e176b26 100644 --- a/addons/survey/__openerp__.py +++ b/addons/survey/__openerp__.py @@ -47,6 +47,7 @@ 'demo_xml': ['survey_demo.xml'], 'test': [ 'test/survey00.yml', + 'test/survey_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/survey/test/survey_report.yml b/addons/survey/test/survey_report.yml new file mode 100644 index 00000000000..13f012cd5a7 --- /dev/null +++ b/addons/survey/test/survey_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a survey, we will print a survey +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-report.'+format), 'wb+').write(data) \ No newline at end of file From 576b7ddef0bd59cdbf22623a7e94760865fab6bf Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 18:50:56 +0530 Subject: [PATCH 24/54] [IMP] account_analytic_plans : YML test for report added bzr revid: ach@tinyerp.com-20100916132056-qeiyaid9g13um3du --- addons/account_analytic_plans/__openerp__.py | 1 + .../report/crossovered_analytic.py | 22 ++++++++++--------- .../test/acount_analytic_plans_report.yml | 9 ++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 addons/account_analytic_plans/test/acount_analytic_plans_report.yml diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py index 0c3d1d07370..41f29737d55 100644 --- a/addons/account_analytic_plans/__openerp__.py +++ b/addons/account_analytic_plans/__openerp__.py @@ -66,6 +66,7 @@ of distribution models. 'wizard/account_crossovered_analytic_view.xml' ], 'demo_xml' : [], + 'test' : ['account_analytic_plans/test/acount_analytic_plans_report.yml'], 'installable': True, 'active' : False, 'certificate': '0036417675373', diff --git a/addons/account_analytic_plans/report/crossovered_analytic.py b/addons/account_analytic_plans/report/crossovered_analytic.py index e064ddc148b..f8a975a4c25 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.py +++ b/addons/account_analytic_plans/report/crossovered_analytic.py @@ -96,17 +96,19 @@ class crossovered_analytic(report_sxw.rml_parse): self.final_list = children_list selected_ids = line_pool.search(self.cr,self.uid,[('account_id','in',self.final_list)]) + if selected_ids: + query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ + WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" + + self.cr.execute(query) + info=self.cr.dictfetchall() - query="SELECT sum(aal.amount) AS amt, sum(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ - WHERE aal.account_id=aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" - - self.cr.execute(query) - info=self.cr.dictfetchall() - - res['ref_qty']=info[0]['qty'] - res['ref_amt']=info[0]['amt'] - self.base_amount= info[0]['amt'] - + res['ref_qty']=info[0]['qty'] + res['ref_amt']=info[0]['amt'] + self.base_amount= info[0]['amt'] + res['ref_qty']=0.0 + res['ref_amt']=0.0 + self.base_amount= 0.0 result.append(res) return result diff --git a/addons/account_analytic_plans/test/acount_analytic_plans_report.yml b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml new file mode 100644 index 00000000000..debeba7daa0 --- /dev/null +++ b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml @@ -0,0 +1,9 @@ +- + Print the Cross Overed Report in Normal mode +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'journal_ids':[6,0,(ref('account.cose_journal_sale'))],'ref':ref('account.analytic_root'),'empty_line':True,'id':ref('account.analytic_root'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.crossovered.analytic').create(cr, uid, [ref('account.analytic_root')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_analytic_plans-crossovered_analyitic.'+format), 'wb+').write(data) \ No newline at end of file From d8946eb67ea4dfe20c0bb5f2c185a67325dbede9 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 18:57:57 +0530 Subject: [PATCH 25/54] [IMP] account_budget : YML test added for reports bzr revid: ach@tinyerp.com-20100916132757-s33ooyffhrubu5g4 --- addons/account_budget/__openerp__.py | 1 + .../test/account_budget_report.yml | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 addons/account_budget/test/account_budget_report.yml diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py index f47e4685246..5d6d8da0def 100644 --- a/addons/account_budget/__openerp__.py +++ b/addons/account_budget/__openerp__.py @@ -63,6 +63,7 @@ Three reports are available: 'demo_xml': ['crossovered_budget_demo.xml'], 'test':[ 'test/account_budget.yml', + 'test/account_budget_report.yml', ], 'installable': True, 'active': False, diff --git a/addons/account_budget/test/account_budget_report.yml b/addons/account_budget/test/account_budget_report.yml new file mode 100644 index 00000000000..fa086e24a64 --- /dev/null +++ b/addons/account_budget/test/account_budget_report.yml @@ -0,0 +1,27 @@ +- + Print the Analytic Budget Report in Normal mode +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account.analytic_root'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account.analytic_root')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-analytic_budget_report.'+format), 'wb+').write(data) +- + Print the Budget Report in Normal mode +- + !python {model: account.budget.post}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.budget.post', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}} + (data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data) +- + Print the Cross Overed Budget Report in Normal mode +- + !python {model: crossovered.budget}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'report':'analytic-full','id':ref('account_budget.crossovered_budget_budgetoptimistic0'),'context':{}}} + (data, format) = netsvc.LocalService('report.crossovered.budget.report').create(cr, uid, [ref('account_budget.crossovered_budget_budgetoptimistic0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_budget-crossovered_budget_report.'+format), 'wb+').write(data) \ No newline at end of file From e4479ffd6abb156316614c635343447f943a87b5 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Thu, 16 Sep 2010 19:30:17 +0530 Subject: [PATCH 26/54] [IMP] point_of_sale : yml test report added bzr revid: jma@tinyerp.com-20100916140017-h651k3095mv24faa --- addons/point_of_sale/__openerp__.py | 3 ++- addons/point_of_sale/test/pos_details_report.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 addons/point_of_sale/test/pos_details_report.yml diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 351fc7ef733..21c7bdaab45 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -74,7 +74,8 @@ Main features : ], 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',], 'test':['test/pos_test.yml', - 'test/pos_report.yml'], + 'test/pos_report.yml', + 'test/pos_details.yml'], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/test/pos_details_report.yml b/addons/point_of_sale/test/pos_details_report.yml new file mode 100644 index 00000000000..72f35b87ec5 --- /dev/null +++ b/addons/point_of_sale/test/pos_details_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details report +- + !python {model: ir.ui.menu}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.details').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d') }}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data) \ No newline at end of file From 12d4d294d95bfbd61787136ba63aab006e9d1b23 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 20:00:48 +0530 Subject: [PATCH 27/54] [FIX] account_invoice_layout : YML test for report added bzr revid: ach@tinyerp.com-20100916143048-p91ljsi6gklyb5xe --- addons/account_invoice_layout/__openerp__.py | 3 ++- .../account_invoice_layout_demo.xml | 14 ++++++++++++++ .../report/report_account_invoice_layout.rml | 8 ++++---- .../test/account_invoice_layout_report.yml | 17 +++++++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 addons/account_invoice_layout/account_invoice_layout_demo.xml create mode 100644 addons/account_invoice_layout/test/account_invoice_layout_report.yml diff --git a/addons/account_invoice_layout/__openerp__.py b/addons/account_invoice_layout/__openerp__.py index 77a6e428de6..36eeb41b137 100644 --- a/addons/account_invoice_layout/__openerp__.py +++ b/addons/account_invoice_layout/__openerp__.py @@ -45,7 +45,8 @@ 'account_invoice_layout_report.xml', 'wizard/account_invoice_special_message.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_invoice_layout_demo.xml'], + 'test':['test/account_invoice_layout_report.yml'], 'installable': True, 'active': False, 'certificate': '0057235078173', diff --git a/addons/account_invoice_layout/account_invoice_layout_demo.xml b/addons/account_invoice_layout/account_invoice_layout_demo.xml new file mode 100644 index 00000000000..cb8df67d997 --- /dev/null +++ b/addons/account_invoice_layout/account_invoice_layout_demo.xml @@ -0,0 +1,14 @@ + + + + + + OpenERP SA + ERP & CRM Solutions.... + + + Tiny sprl + Be Expert with the Experts... + + + \ No newline at end of file diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 77781c4191d..8f7d5f561e8 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -297,7 +297,7 @@ - Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]] + Note: [[ (a['note'] and format(a['note'] or '')) or removeParentNode('tr') ]] @@ -337,7 +337,7 @@ - [[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]] + [[ a['type']=='text' and format(a['name'] or '') or removeParentNode('blockTable') ]] [[ a['type']=='text' and '' ]] @@ -467,7 +467,7 @@ - [[ format(o.comment or removeParentNode('blockTable')) ]] + [[ format(o.comment or '') or removeParentNode('blockTable') ]] @@ -477,7 +477,7 @@ - [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]] + [[ format((o.payment_term and o.payment_term.note or '') or removeParentNode('blockTable')) ]] diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml new file mode 100644 index 00000000000..b7b1c1e76cc --- /dev/null +++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml @@ -0,0 +1,17 @@ +- + Print the Invoice layout report in Normal Mode +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data) +- + Print the Invoice Layout Report with Message in Normal mode +- + !python {model: account.invoice}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('account.test_invoice_1'),'context':{}}} + (data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('account.test_invoice_1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data) \ No newline at end of file From 3f9135bdd2284487a3ee00a176511281b6003f3e Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 20:14:14 +0530 Subject: [PATCH 28/54] [IMP/FIX] Account : More yml test for reports bzr revid: jvo@tinyerp.com-20100916144414-vrfifojv7rfok1x2 --- .../account/report/account_general_journal.py | 2 +- addons/account/test/account_report.yml | 76 ++++++++++++++++++- 2 files changed, 73 insertions(+), 5 deletions(-) diff --git a/addons/account/report/account_general_journal.py b/addons/account/report/account_general_journal.py index 8cd3dad05ba..684a75b1f20 100644 --- a/addons/account/report/account_general_journal.py +++ b/addons/account/report/account_general_journal.py @@ -86,7 +86,7 @@ class journal_print(report_sxw.rml_parse, common_report_header): 'FROM account_move_line l ' 'LEFT JOIN account_journal j ON (l.journal_id=j.id) ' 'LEFT JOIN res_currency c on (l.currency_id=c.id)' - 'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + '' + 'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' ' 'GROUP BY j.id, j.code, j.name, l.amount_currency,c.code, l.currency_id ', (period_id, tuple(self.journal_ids))) return self.cr.dictfetchall() diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 67db2dc628f..619d8f7771e 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -71,7 +71,7 @@ file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data) - - Print the Account Balance Report in Normal mode + Print the Account Balance Report in Normal mode - From Account Chart - !python {model: account.account}: | import netsvc, tools, os, time @@ -79,9 +79,17 @@ (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) + print "Account Balance Report in Normal mode - From Menu" + + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]}) + + (data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data) - - Print the Central Journal Report + Print the Central Journal Report - From Account - !python {model: account.journal.period}: | import netsvc, tools, os, time @@ -90,11 +98,71 @@ journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) - data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True','target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) + + print "Central Journal Report - From Menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids':journal_period_ids}) + + (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) +- + Print the General Journal Report - From Journal +- + !python {model: account.journal.period}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) + + data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} + (data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data) +- + Print the General Ledger Report in Normal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':' True ','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data) + print "GL report from menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids': acc_ids}) + (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal-menu.'+format), 'wb+').write(data) +- + Print the General Ledger Report in Landscape Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':' True ','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal-landscape.'+format), 'wb+').write(data) + + print "GL report landscape mode from menu" + data_dict.update({'model': 'ir.ui.menu'}) + data_dict['form'].update({'active_ids': acc_ids}) + (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-general_journal-landscape-menu.'+format), 'wb+').write(data) - \ No newline at end of file From e470276384fcd7e999dfcc1abd3f1014a915020c Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 21:08:14 +0530 Subject: [PATCH 29/54] [IMP] account_payment : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100916153814-s4qakadpqjkvem2j --- addons/account_payment/__openerp__.py | 7 ++++-- .../account_payment/account_payment_demo.xml | 24 +++++++++++++++++++ .../test/account_payment_report.yml | 8 +++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 addons/account_payment/account_payment_demo.xml create mode 100644 addons/account_payment/test/account_payment_report.yml diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index f3e437face2..5114a576512 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -47,8 +47,11 @@ 'account_invoice_view.xml', 'account_payment_report.xml', ], - 'demo_xml': [], - 'test': ['test/account_payment.yml'], + 'demo_xml': ['account_payment_demo.xml'], + 'test': [ + 'test/account_payment.yml' + 'test/account_payment_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0061703998541', diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml new file mode 100644 index 00000000000..25fe4a2c55b --- /dev/null +++ b/addons/account_payment/account_payment_demo.xml @@ -0,0 +1,24 @@ + + + + + Reserve Bank + 00987654321 + + + + + Direct Payment + + + + + + ORDER1 + + + now + draft + + + diff --git a/addons/account_payment/test/account_payment_report.yml b/addons/account_payment/test/account_payment_report.yml new file mode 100644 index 00000000000..45022e19a73 --- /dev/null +++ b/addons/account_payment/test/account_payment_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Account Payment, Print a Payment Order +- + !python {model: payment.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('account_payment.payment_order_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data) \ No newline at end of file From 4d247a148f74165b621dc1f2ee754785f199c404 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 21:28:03 +0530 Subject: [PATCH 30/54] [IMP/FIX] Account : More yml test for reports bzr revid: jvo@tinyerp.com-20100916155803-b5be6vb8e6lxcxqd --- addons/account/test/account_report.yml | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 6db4efeedd8..fbb2c9effb3 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -199,3 +199,53 @@ (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data) + +- + Print the Partner Ledger Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':' True ','amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all','query_line':'True '}} + (data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data) + +- + Print the Partner Ledger-Other Report +- + !python {model: res.partner}: | + import netsvc, tools, os, time + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':' True ','amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all','query_line':' True '}} + (data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data) + +- + Print the Profit-Loss Report in Normal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': False,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} + (data, format) = netsvc.LocalService('report.pl.account').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss.'+format), 'wb+').write(data) + +- + Print the Profit-Loss Report in Horizontal Mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [] + acc_ids = [ref('account.bal'),ref('account.gpf')] + data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} + (data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) \ No newline at end of file From 02104162ab1c144e52499eba60b57dccc54e1614 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 22:04:17 +0530 Subject: [PATCH 31/54] [IMP] account_report : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100916163417-brojjn3w1uvylwuk --- addons/account_report/__openerp__.py | 3 ++- addons/account_report/account_report_demo.xml | 11 +++++++++++ .../account_report/report/print_indicator.rml | 2 +- .../test/account_report_report.yml | 17 +++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 addons/account_report/account_report_demo.xml create mode 100644 addons/account_report/test/account_report_report.yml diff --git a/addons/account_report/__openerp__.py b/addons/account_report/__openerp__.py index 07afc6ed58f..b8029bf3563 100644 --- a/addons/account_report/__openerp__.py +++ b/addons/account_report/__openerp__.py @@ -42,7 +42,8 @@ 'wizard/account_report_print_indicators_with_pdf_view.xml', 'board_account_report_view.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_report_demo.xml'], + 'test': ['test/account_report.yml'], 'installable': True, 'active': False, 'certificate': '0050976406925', diff --git a/addons/account_report/account_report_demo.xml b/addons/account_report/account_report_demo.xml new file mode 100644 index 00000000000..30f1318c592 --- /dev/null +++ b/addons/account_report/account_report_demo.xml @@ -0,0 +1,11 @@ + + + + + Account Demo Report + ADR + fiscal + debit>0.0 + + + \ No newline at end of file diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml index 52133cb894e..160cd435ada 100644 --- a/addons/account_report/report/print_indicator.rml +++ b/addons/account_report/report/print_indicator.rml @@ -119,7 +119,7 @@ - [['..........'*(o['level']) ]] [[ format(o['note']) or removeParentNode('blockTable') ]] + [['..........'*(o['level']) ]] [[ format(o['note'] or '') or removeParentNode('blockTable') ]] diff --git a/addons/account_report/test/account_report_report.yml b/addons/account_report/test/account_report_report.yml new file mode 100644 index 00000000000..d94dce1f553 --- /dev/null +++ b/addons/account_report/test/account_report_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on Account, Print a Financial Statement Report +- + !python {model: account.report.report}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.accounting.report').create(cr, uid, [ref('account_report.account_report_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_report-financial_statement_report.'+format), 'wb+').write(data) +- + Print the Indicators Report in Normal mode +- + !python {model: account.report.history }: | + import netsvc, tools, os, time + data_dict = {'model': 'ir.ui.menu', 'form': {'select_base':'year','base_selection':[ref('account.data_fiscalyear')],'context':{}}} + (data, format) = netsvc.LocalService('report.print.indicators').create(cr, uid, [], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_report-indicators_report.'+format), 'wb+').write(data) \ No newline at end of file From 416220ea9040ed5dcc762b7b67b8baa0756981a9 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 16 Sep 2010 22:08:39 +0530 Subject: [PATCH 32/54] [IMP/FIX] Account : More yml test for reports bzr revid: jvo@tinyerp.com-20100916163839-wraq5zl13tb0xdow --- addons/account/report/tax_report.py | 2 -- addons/account/test/account_report.yml | 44 +++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/addons/account/report/tax_report.py b/addons/account/report/tax_report.py index 15607a79011..a89335f99c5 100644 --- a/addons/account/report/tax_report.py +++ b/addons/account/report/tax_report.py @@ -212,10 +212,8 @@ class tax_report(rml_parse.rml_parse): result_accounts.append(account_elem) ind+=1 - return result_accounts - report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code', 'addons/account/report/tax_report.rml', parser=tax_report, header="internal") diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index fbb2c9effb3..3dc65b10219 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -12,10 +12,33 @@ - !python {model: res.partner}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c'),ref('base.res_partner_sednacom'),ref('base.res_partner_thymbra'),ref('base.res_partner_desertic_hispafuentes'),ref('base.res_partner_tinyatwork'),ref('base.res_partner_2'),ref('base.res_partner_3'),ref('base.res_partner_4'),ref('base.res_partner_5'),ref('base.res_partner_6'),ref('base.res_partner_maxtor'),ref('base.res_partner_seagate'),ref('base.res_partner_8'),ref('base.res_partner_9'),ref('base.res_partner_10'),ref('base.res_partner_11'),ref('base.res_partner_14'),ref('base.res_partner_15'),ref('base.res_partner_accent')], {}, {}) + (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data) +#- +# Demo data for Account tax code +#- +# !record {model: account.tax.code, id: account_tax_code0}: +# name : Tax Code Test +#- +# Print Tax Code entries report +#- +# !python {model: account.tax.code}: | +# import netsvc, tools, os +# (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref("account.account_tax_code0")], {}, {}) +# if tools.config['test_report_directory']: +# file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on an invoice, we will print an invoice +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data) + - Print the Aged Partner Balance Report - @@ -41,15 +64,26 @@ file(os.path.join(tools.config['test_report_directory'], 'account-aged_partner_balance.'+format), 'wb+').write(data) - - Print the Account Balance Report in Landscape mode + Print the Compare Account Balance Report in Normal mode +- + !python {model: account.account}: | + import netsvc, tools, os, time + data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} + (data, format) = netsvc.LocalService('report.account.balance.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance.'+format), 'wb+').write(data) + +- + Print the Compare Account Balance Report in Landscape mode - !python {model: account.account}: | import netsvc, tools, os, time data_dict = {'model': 'account.account', 'form': {'id':ref('account.bal'),'chart_account_id':ref('account.chart0'),'select_account': False,'format_perc':0,'show_columns' :0, 'compare_pattern': 'none','account_choice': 'moves','landscape':1,'period_manner': 'actual','fiscalyear': [ref('account.data_fiscalyear')] ,'target_move': 'all','periods': [],'context':{'state':'all'}}} (data, format) = netsvc.LocalService('report.account.account.balance.landscape').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-landscape.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'account-compare-account_balance-landscape.'+format), 'wb+').write(data) + - Print the Account Balance Sheet in Hotizontal mode - @@ -248,4 +282,6 @@ data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} (data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) + + \ No newline at end of file From 8e79e7a22011d3b8d9e571c11bd2a03b2a4679dc Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 22:35:41 +0530 Subject: [PATCH 33/54] [IMP] account_reporting : YML test for report added bzr revid: ach@tinyerp.com-20100916170541-04lc7ihk3t62a5vc --- addons/account_reporting/__openerp__.py | 3 ++- addons/account_reporting/account_reporting_demo.xml | 9 +++++++++ .../account_reporting/test/account_reporting_report.yml | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 addons/account_reporting/account_reporting_demo.xml create mode 100644 addons/account_reporting/test/account_reporting_report.yml diff --git a/addons/account_reporting/__openerp__.py b/addons/account_reporting/__openerp__.py index 5ac93d17984..fb05e755ac2 100644 --- a/addons/account_reporting/__openerp__.py +++ b/addons/account_reporting/__openerp__.py @@ -36,7 +36,8 @@ 'account_data.xml', 'wizard/account_reporting_balance_report_view.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_reporting_demo.xml'], + 'test': ['test/account_reporting_report.yml'], 'installable': True, 'active': False, 'certificate': '0072305016797', diff --git a/addons/account_reporting/account_reporting_demo.xml b/addons/account_reporting/account_reporting_demo.xml new file mode 100644 index 00000000000..880fa51deda --- /dev/null +++ b/addons/account_reporting/account_reporting_demo.xml @@ -0,0 +1,9 @@ + + + + + My Balance Sheet + MBS + + + \ No newline at end of file diff --git a/addons/account_reporting/test/account_reporting_report.yml b/addons/account_reporting/test/account_reporting_report.yml new file mode 100644 index 00000000000..9754f53cc4d --- /dev/null +++ b/addons/account_reporting/test/account_reporting_report.yml @@ -0,0 +1,9 @@ +- + Print the Balance Sheet Report in Normal mode +- + !python {model: account.report.bs }: | + import netsvc, tools, os, time + data_dict = {'model': 'account.report.bs', 'form': {'fiscalyear':ref('account.data_fiscalyear'),'periods':[ref('account.period_1'),ref('account.period_2'),ref('account.period_3')],'context':{}}} + (data, format) = netsvc.LocalService('report.account.report.bs').create(cr, uid, [ref('account_reporting.account_balance_sheet_1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_reporting-balance_sheet_report.'+format), 'wb+').write(data) \ No newline at end of file From c8e1c459430bda386d98275244eee44060a15915 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Fri, 17 Sep 2010 02:57:23 +0530 Subject: [PATCH 34/54] [IMP/FIX] Account : Completion of test for reports bzr revid: jvo@tinyerp.com-20100916212723-i9dvncrwn6p0w629 --- addons/account/report/voucher_print.rml | 2 +- addons/account/test/account_report.yml | 126 +++++++++++++++++++++--- 2 files changed, 113 insertions(+), 15 deletions(-) diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml index abfa714aa43..b1d7941068c 100644 --- a/addons/account/report/voucher_print.rml +++ b/addons/account/report/voucher_print.rml @@ -325,7 +325,7 @@ - [[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]] + [[ voucher.line_id and voucher.line_id[0].name or removeParentNode('para') ]] diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 3dc65b10219..44899ec1d8d 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -16,20 +16,38 @@ if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on Account Move, we will print the Voucher Report +- + !python {model: account.move}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data) + #- # Demo data for Account tax code #- -# !record {model: account.tax.code, id: account_tax_code0}: +# !record {model: account.tax.code, id: account_tax_code_0}: # name : Tax Code Test #- # Print Tax Code entries report #- # !python {model: account.tax.code}: | # import netsvc, tools, os -# (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref("account.account_tax_code0")], {}, {}) +# (data, format) = netsvc.LocalService('report.account.tax.code.entries').create(cr, uid, [ref('account.account_tax_code_0')], {}, {}) # if tools.config['test_report_directory']: # file(os.path.join(tools.config['test_report_directory'], 'account-tax-code-entries.'+format), 'wb+').write(data) +#- +# Print Vat Declaration Report +#- +# !python {model: account.tax.code}: | +# import netsvc, tools, os +# data_dict = {'model': 'ir.ui.menu', 'form': {'based_on': 'invoices','company_id':ref('base.main_company'),'periods':[]}} +# (data, format) = netsvc.LocalService('report.account.vat.declaration').create(cr, uid, [ref("account.account_tax_code0")], data_dict, {}) +# if tools.config['test_report_directory']: +# file(os.path.join(tools.config['test_report_directory'], 'account-vat-declaration.'+format), 'wb+').write(data) - In order to test the PDF reports defined on an invoice, we will print an invoice - @@ -57,7 +75,18 @@ 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False), } start = stop - RelativeDateTime(days=1) - data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': [], 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : 'True', 'id': 1,'result_selection': 'customer','direction_selection': 'past'}} + obj_move = self.pool.get('account.move.line') + ctx = {} + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) + journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'ir.ui.menu', 'form': {'chart_account_id':ref('account.chart0'),'initial_balance': 1, 'periods': period_list,'journal_ids':journal_ids, 'page_split': 0, 'date_from': time.strftime('%Y-%m-%d'), 'period_length': 30, 'amount_currency': 0,'query_line' : query_line, 'result_selection': 'customer','direction_selection': 'past','fiscalyear_id':fy_id}} data_dict['form'].update(res) (data, format) = netsvc.LocalService('report.account.aged_trial_balance').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: @@ -85,7 +114,7 @@ - - Print the Account Balance Sheet in Hotizontal mode + Print the Account Balance Sheet in Horizontal mode - !python {model: account.account}: | import netsvc, tools, os, time @@ -132,7 +161,14 @@ journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) - data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data) @@ -154,7 +190,14 @@ journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) - data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}} (data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data) @@ -168,7 +211,16 @@ period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] acc_ids = [ref('account.bal'),ref('account.gpf')] - data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':' True ','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger.'+format), 'wb+').write(data) @@ -188,7 +240,16 @@ period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] acc_ids = [ref('account.bal'),ref('account.gpf')] - data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':' True ','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape.'+format), 'wb+').write(data) @@ -210,7 +271,15 @@ journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) - data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }} (data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data) @@ -228,8 +297,18 @@ - !python {model: res.partner}: | import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] - data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all','query_line':' True '}} + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} (data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data) @@ -239,8 +318,19 @@ - !python {model: res.partner}: | import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] - data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':' True ','amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all','query_line':'True '}} + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} (data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data) @@ -250,8 +340,18 @@ - !python {model: res.partner}: | import netsvc, tools, os, time + fy_id = ref('account.data_fiscalyear') + period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] - data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':' True ','amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all','query_line':' True '}} + + obj_move = self.pool.get('account.move.line') + ctx = {} + ctx['fiscalyear'] = fy_id + ctx['journal_ids'] = journal_ids + ctx['chart_account_id'] = ref('account.chart0') + + query_line = obj_move._query_get(cr, uid, obj='l', context=ctx) + data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}} (data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data) @@ -283,5 +383,3 @@ (data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) - - \ No newline at end of file From 0f70b04e5bcb7f188772be272ee8a60893af7010 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 09:57:22 +0530 Subject: [PATCH 35/54] [IMP] survey : YML test for report added bzr revid: ach@tinyerp.com-20100917042722-f6vpep1bq4brfr9o --- addons/survey/test/survey_report.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/addons/survey/test/survey_report.yml b/addons/survey/test/survey_report.yml index 13f012cd5a7..adb3ddb28ed 100644 --- a/addons/survey/test/survey_report.yml +++ b/addons/survey/test/survey_report.yml @@ -1,8 +1,24 @@ - - In order to test the PDF reports defined on a survey, we will print a survey + In order to test the PDF reports defined on a Survey, we will print Survey Analysis Report - !python {model: survey}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'survey-report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_analysis_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Survey, we will print Survey Browse Response Report +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.browse.response').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_browse_response_report.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Survey, we will print Survey Form Report +- + !python {model: survey}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.survey.form').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'survey-survey_form_report.'+format), 'wb+').write(data) \ No newline at end of file From 02a9c6f837ce310f5ef3bf92eed5ef171031a9d8 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Fri, 17 Sep 2010 10:20:55 +0530 Subject: [PATCH 36/54] [IMP] point_of_sale : yml test report added bzr revid: jma@tinyerp.com-20100917045055-iboip65l02zg6i2m --- addons/point_of_sale/__openerp__.py | 3 ++- addons/point_of_sale/test/pos_payment_report_date.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 addons/point_of_sale/test/pos_payment_report_date.yml diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 21c7bdaab45..6f33f75f65d 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -75,7 +75,8 @@ Main features : 'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',], 'test':['test/pos_test.yml', 'test/pos_report.yml', - 'test/pos_details.yml'], + 'test/pos_details.yml', + 'test/pos_payment_report_date.yml'], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/test/pos_payment_report_date.yml b/addons/point_of_sale/test/pos_payment_report_date.yml new file mode 100644 index 00000000000..15eefcdc6ab --- /dev/null +++ b/addons/point_of_sale/test/pos_payment_report_date.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Point Of Sale, we will print a POS Sales Lines report +- + !python {model: ir.ui.menu}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.pos.payment.report.date').create(cr, uid, [1], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [ref('base.user_root')] }}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data) \ No newline at end of file From 799e478d18b16be5ce54eab886b5c15f7eec53a8 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 11:22:02 +0530 Subject: [PATCH 37/54] [IMP] stock : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100917055202-watsndx8n2biait4 --- addons/stock/stock_demo.xml | 8 +++- .../test/stock_inventory_move_report.yml | 8 ---- .../stock/test/stock_lot_location_report.yml | 8 ---- addons/stock/test/stock_overview_report.yml | 8 ---- .../stock/test/stock_overviewall_report.yml | 8 ---- addons/stock/test/stock_report.yml | 48 +++++++++++++++++++ 6 files changed, 55 insertions(+), 33 deletions(-) delete mode 100644 addons/stock/test/stock_inventory_move_report.yml delete mode 100644 addons/stock/test/stock_lot_location_report.yml delete mode 100644 addons/stock/test/stock_overview_report.yml delete mode 100644 addons/stock/test/stock_overviewall_report.yml create mode 100644 addons/stock/test/stock_report.yml diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 6607d97b2b3..03a29838981 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -270,6 +270,12 @@ - + + PACKO1 + out + direct + 2binvoiced + + diff --git a/addons/stock/test/stock_inventory_move_report.yml b/addons/stock/test/stock_inventory_move_report.yml deleted file mode 100644 index a92db995427..00000000000 --- a/addons/stock/test/stock_inventory_move_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report -- - !python {model: stock.inventory}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.stock_inventory_0')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_lot_location_report.yml b/addons/stock/test/stock_lot_location_report.yml deleted file mode 100644 index d31bdf620d4..00000000000 --- a/addons/stock/test/stock_lot_location_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on stock location, we will print a lot location report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overview_report.yml b/addons/stock/test/stock_overview_report.yml deleted file mode 100644 index 22d75625a63..00000000000 --- a/addons/stock/test/stock_overview_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a stock, we will print a Stock Overview report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overviewall_report.yml b/addons/stock/test/stock_overviewall_report.yml deleted file mode 100644 index 8f3bb61d044..00000000000 --- a/addons/stock/test/stock_overviewall_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_report.yml b/addons/stock/test/stock_report.yml new file mode 100644 index 00000000000..491fd7fa9d7 --- /dev/null +++ b/addons/stock/test/stock_report.yml @@ -0,0 +1,48 @@ +- + In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock location, we will print a lot location report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report +- + !python {model: stock.inventory}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.stock_inventory_0')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a stock, we will print a Stock Overview report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a stock, we will print a Stock Picking List report +- + !python {model: stock.picking}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('stock.stock_picking_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Stock, we will print Product Stock Report +- + !python {model: product.product}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product.product_product_pc1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data) \ No newline at end of file From 1210a7a16136cfa11bd07070e9f6ba967d6c4e17 Mon Sep 17 00:00:00 2001 From: "DHS (OpenERP)" Date: Fri, 17 Sep 2010 11:34:08 +0530 Subject: [PATCH 38/54] [IMP] l10n_ch,l10n_fr,l10n_lu,mrp : yml report test added bzr revid: dhs@tinyerp.com-20100917060408-10ytdjjr1jn4tnn4 --- addons/l10n_ch/__openerp__.py | 3 +++ addons/l10n_fr/__openerp__.py | 3 ++- addons/l10n_lu/__openerp__.py | 1 + addons/mrp/test/mrp_report.yml | 17 +++++++++++++---- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/addons/l10n_ch/__openerp__.py b/addons/l10n_ch/__openerp__.py index de378528b33..1af2e70ca59 100644 --- a/addons/l10n_ch/__openerp__.py +++ b/addons/l10n_ch/__openerp__.py @@ -94,6 +94,9 @@ TODO : "account_journal_view.xml", "security/ir.model.access.csv", ], + 'test' : [ + 'test/l10n_ch_report.yml', + ], "active": False, "installable": True, } diff --git a/addons/l10n_fr/__openerp__.py b/addons/l10n_fr/__openerp__.py index f96945a8bc8..0de26734781 100644 --- a/addons/l10n_fr/__openerp__.py +++ b/addons/l10n_fr/__openerp__.py @@ -48,8 +48,9 @@ Credits: Sistheo Zeekom CrysaLEAD "security/ir.model.access.csv", "wizard/fr_report_bilan_view.xml", "wizard/fr_report_compute_resultant_view.xml", - + ], + "test": ['test/l10n_fr_report.yml'], "demo_xml" : [], "certificate" : "00435321693876313629", "active": False, diff --git a/addons/l10n_lu/__openerp__.py b/addons/l10n_lu/__openerp__.py index 739f36c9ce4..d1f6ba49905 100644 --- a/addons/l10n_lu/__openerp__.py +++ b/addons/l10n_lu/__openerp__.py @@ -41,6 +41,7 @@ This module installs: 'account.tax.template.csv', 'wizard/print_vat_view.xml' ], + 'test': ['test/l10n_lu_report.yml'], 'demo_xml': ['account.report.report.csv'], 'installable': True, 'active': False, diff --git a/addons/mrp/test/mrp_report.yml b/addons/mrp/test/mrp_report.yml index 5c619e0b09d..6a13d489104 100644 --- a/addons/mrp/test/mrp_report.yml +++ b/addons/mrp/test/mrp_report.yml @@ -8,7 +8,7 @@ file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_order.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a mrp, we will print a order + In order to test the PDF reports defined on a mrp, we will print an order - !python {model: mrp.production}: | import netsvc, tools, os @@ -17,10 +17,19 @@ file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a mrp, we will print a (mrp)Product-price order + In order to test the PDF reports defined on a mrp product price, we will print a (mrp)Product Price order - !python {model: product.product}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [ref('product.product_product_0'), ref('product.product_product_pc2'), ref('product.product_product_cpu1'), ref('product.product_product_hdd1'), ref('product.product_product_fan'), ref('product.product_product_cpu1'), ref('product.product_product_ram512')], {}, {}) + (data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'mrp-production-price_order.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'mrp_product-price_order.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a mrp workcenter, we will print a (mrp)workcenter +- + !python {model: mrp.workcenter}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'mrp_workcenter.'+format), 'wb+').write(data) From cf8c080bacc0b122ec382b7fe733084e070589d7 Mon Sep 17 00:00:00 2001 From: "DHS (OpenERP)" Date: Fri, 17 Sep 2010 11:36:32 +0530 Subject: [PATCH 39/54] [IMP] l10n_ch,l10n_fr,l10n_lu : YML test for report added bzr revid: dhs@tinyerp.com-20100917060632-e2d2i8ike9ywsps9 --- addons/l10n_ch/test/l10n_ch_report.yml | 17 +++++++++++++++++ addons/l10n_fr/test/l10n_fr_report.yml | 26 ++++++++++++++++++++++++++ addons/l10n_lu/test/l10n_lu_report.yml | 14 ++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 addons/l10n_ch/test/l10n_ch_report.yml create mode 100644 addons/l10n_fr/test/l10n_fr_report.yml create mode 100644 addons/l10n_lu/test/l10n_lu_report.yml diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml new file mode 100644 index 00000000000..0379e6bc83b --- /dev/null +++ b/addons/l10n_ch/test/l10n_ch_report.yml @@ -0,0 +1,17 @@ +- + In order to test the PDF reports defined on a l10n_ch, we will print a bvr_report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_order.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a l10n_ch, we will print a bvr_invoice_report +- + !python {model: account.invoice}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice.'+format), 'wb+').write(data) diff --git a/addons/l10n_fr/test/l10n_fr_report.yml b/addons/l10n_fr/test/l10n_fr_report.yml new file mode 100644 index 00000000000..cfc4f659925 --- /dev/null +++ b/addons/l10n_fr/test/l10n_fr_report.yml @@ -0,0 +1,26 @@ +- + In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear "Fiscal Year 2011" to which the entries will move +- + !record {model: account.fiscalyear, id: account_fiscalyear_0}: + code: FY2011 + company_id: base.main_company + date_start: '2011-01-01' + date_stop: '2011-12-31' + name: Fiscal Year 2011 +- + In order to test the PDF reports defined on a l10n_fr, we will print a account move line for l10n_fr +- + !python {model: account.move.line}: | + import netsvc, tools, os, time + (data, format) = netsvc.LocalService('report.l10n.fr.bilan').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account_fiscalyear_0')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-bilan.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a l10n_fr, we will print a compute result for l10n_fr +- + !python {model: account.move.line}: | + import netsvc, tools, os,time + (data, format) = netsvc.LocalService('report.l10n.fr.compute_resultant').create(cr, uid, [], {'model':'account.move.line', 'form':{'fiscalyear_id': ref('account.data_fiscalyear')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_fr-compute_resultant.'+format), 'wb+').write(data) diff --git a/addons/l10n_lu/test/l10n_lu_report.yml b/addons/l10n_lu/test/l10n_lu_report.yml new file mode 100644 index 00000000000..0ea9850df9a --- /dev/null +++ b/addons/l10n_lu/test/l10n_lu_report.yml @@ -0,0 +1,14 @@ +- + It is demo data for the account.tax.code +- + !record {model: account.tax.code, id: account_tax_code_id_r1}: + name: a + +- + In order to test the PDF reports defined on a l10u_lu, we will print a vat +- + !python {model: res.partner}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.l10n_lu.tax.report.print').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'tax_code_id': ref('account_tax_code_id_r1'), 'period_id': ref('account.period_1')}}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'l10n_lu-vat.'+format), 'wb+').write(data) From 5ad4e3bc2ef28aa8b9f2b89b8e40925ca0c223f9 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 11:41:35 +0530 Subject: [PATCH 40/54] [FIX] stock,sale_layout : __openerp__.py file corrected bzr revid: ach@tinyerp.com-20100917061135-4orswyxxv9pv3dbt --- addons/sale_layout/__openerp__.py | 2 +- addons/stock/__openerp__.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py index 898915b6d99..b8490c02fc9 100755 --- a/addons/sale_layout/__openerp__.py +++ b/addons/sale_layout/__openerp__.py @@ -40,7 +40,7 @@ "sale_layout_view.xml", "sale_layout_report.xml", ], - "test" : ['sale_layout_report.yml'], + "test" : ['test/sale_layout_report.yml'], "active": False, "installable": True } diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index e961c49333a..432f95242bd 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -75,10 +75,7 @@ Thanks to the double entry management, the inventory controlling is powerful and "board_warehouse_view.xml" ], 'test': ['test/stock_test.yml', - 'test/stock_inventory_move_report.yml', - 'test/stock_lot_location_report.yml', - 'test/stock_overview_report.yml', - 'test/stock_overviewall_report.yml' + 'test/stock_report.yml', ], 'installable': True, 'active': False, From d3dd802b45cd1f384196dec3e801a4d15cb052eb Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 11:43:18 +0530 Subject: [PATCH 41/54] [FIX] sale : YML test for report corrected bzr revid: ach@tinyerp.com-20100917061318-h7stdwp2mkgr5vqm --- addons/sale/__openerp__.py | 1 - addons/sale/test/sale_report.yml | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py index eb108373201..6978a0bb072 100644 --- a/addons/sale/__openerp__.py +++ b/addons/sale/__openerp__.py @@ -79,7 +79,6 @@ 'test/sale_procurement.yml', 'test/invoice_on_ordered_qty.yml', 'test/invoice_on_shipped_qty.yml', - 'test/sale_order_print.yml', 'test/sale_report.yml', ], 'installable': True, diff --git a/addons/sale/test/sale_report.yml b/addons/sale/test/sale_report.yml index 6453d52f658..d60420294fe 100644 --- a/addons/sale/test/sale_report.yml +++ b/addons/sale/test/sale_report.yml @@ -1,3 +1,11 @@ +- + In order to test the PDF reports defined on a sale order, we will print a sale order +- + !python {model: sale.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data) - In order to test the PDF reports defined on a sale order, we will print a report for sale prepare allot - From bd3b43b2ca6962090fd23e982cb4927fc169f5b6 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 11:58:37 +0530 Subject: [PATCH 42/54] [FIX] report_intrastat : report name corrected in yml bzr revid: ach@tinyerp.com-20100917062837-u56227neca31ggn9 --- addons/report_intrastat/test/report_instratat_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/report_intrastat/test/report_instratat_report.yml b/addons/report_intrastat/test/report_instratat_report.yml index 821ce528cfd..c6162f51c25 100644 --- a/addons/report_intrastat/test/report_instratat_report.yml +++ b/addons/report_intrastat/test/report_instratat_report.yml @@ -5,4 +5,4 @@ import netsvc, tools, os (data, format) = netsvc.LocalService('report.account.invoice.intrastat').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat report.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat_report.'+format), 'wb+').write(data) From 07552b6246b47f819d1cd4998fb051fc8818af4f Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 12:14:03 +0530 Subject: [PATCH 43/54] [FIX] purchase_requisition,report_intrastat : YML and __openerp__.py files corrected bzr revid: ach@tinyerp.com-20100917064403-eovtq294ebzwut5l --- addons/purchase_requisition/__openerp__.py | 2 +- .../purchase_requisition/test/purchase_requisition_report.yml | 2 +- addons/report_intrastat/__openerp__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/purchase_requisition/__openerp__.py b/addons/purchase_requisition/__openerp__.py index 7594fdcb96b..0cfc48feccd 100644 --- a/addons/purchase_requisition/__openerp__.py +++ b/addons/purchase_requisition/__openerp__.py @@ -38,7 +38,7 @@ "security/ir.model.access.csv","purchase_requisition_sequence.xml" ], "active": False, - "test":['purchase_requisition_report.yml'], + "test":['test/purchase_requisition_report.yml'], "installable": True } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_requisition/test/purchase_requisition_report.yml b/addons/purchase_requisition/test/purchase_requisition_report.yml index 73edfe18054..29edea96a8a 100644 --- a/addons/purchase_requisition/test/purchase_requisition_report.yml +++ b/addons/purchase_requisition/test/purchase_requisition_report.yml @@ -5,4 +5,4 @@ import netsvc, tools, os (data, format) = netsvc.LocalService('report.purchase.requisition').create(cr, uid, [ref('purchase_requisition.order_purchase_requisition1')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition- purchase requisition report.'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition-purchase_requisition_report.'+format), 'wb+').write(data) diff --git a/addons/report_intrastat/__openerp__.py b/addons/report_intrastat/__openerp__.py index ca421627ff5..b4dc9b52c89 100644 --- a/addons/report_intrastat/__openerp__.py +++ b/addons/report_intrastat/__openerp__.py @@ -37,7 +37,7 @@ 'intrastat_report.xml' ], 'demo_xml': [], - 'test': ['report_instratat_report.yml'], + 'test': ['test/report_instratat_report.yml'], 'installable': True, 'active': False, 'certificate': '0056982189085', From 51bd63ea9594715254bb82eae11ab472c3ea3007 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Fri, 17 Sep 2010 12:21:44 +0530 Subject: [PATCH 44/54] [IMP] delivery : yml test report added bzr revid: jma@tinyerp.com-20100917065144-mw8m99dopc4umqg2 --- addons/delivery/__openerp__.py | 2 +- addons/delivery/test/delivery_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 addons/delivery/test/delivery_report.yml diff --git a/addons/delivery/__openerp__.py b/addons/delivery/__openerp__.py index 193bd0bcaee..0f183f0d244 100644 --- a/addons/delivery/__openerp__.py +++ b/addons/delivery/__openerp__.py @@ -40,7 +40,7 @@ 'partner_view.xml' ], 'demo_xml': ['delivery_demo.xml'], - 'test':['test/delivery_test.yml',], + 'test':['test/delivery_test.yml','test/delievry_report.yml'], 'installable': True, 'active': False, 'certificate': '0033981912253', diff --git a/addons/delivery/test/delivery_report.yml b/addons/delivery/test/delivery_report.yml new file mode 100644 index 00000000000..ed3a859f23d --- /dev/null +++ b/addons/delivery/test/delivery_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Delievry, we will print a Delivery Order report +- + !python {model: stock.picking}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.sale.shipping').create(cr, uid, [ref('stock.stock_picking_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'delievry-shipping'+format), 'wb+').write(data) From 86803a81d422602274f92c1fbf4bb743f084648b Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Fri, 17 Sep 2010 12:31:02 +0530 Subject: [PATCH 45/54] [IMP] delivery : changes bzr revid: jma@tinyerp.com-20100917070102-a6pd9qjydcr1l4m1 --- addons/delivery/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/delivery/__openerp__.py b/addons/delivery/__openerp__.py index 0f183f0d244..ad88d552e6b 100644 --- a/addons/delivery/__openerp__.py +++ b/addons/delivery/__openerp__.py @@ -40,7 +40,7 @@ 'partner_view.xml' ], 'demo_xml': ['delivery_demo.xml'], - 'test':['test/delivery_test.yml','test/delievry_report.yml'], + 'test':['test/delivery_test.yml','test/delivery_report.yml'], 'installable': True, 'active': False, 'certificate': '0033981912253', From f183f4863ffc87f42e0d7bf39a1e2637ab4e45e7 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 12:52:11 +0530 Subject: [PATCH 46/54] [FIX] purchase : YML and __openerp__.py files corrected bzr revid: ach@tinyerp.com-20100917072211-jx7waxcmzjgppj4b --- addons/purchase/__openerp__.py | 1 + addons/purchase/test/purchase_report.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py index c7b4de7decc..7af6dbceff0 100644 --- a/addons/purchase/__openerp__.py +++ b/addons/purchase/__openerp__.py @@ -60,6 +60,7 @@ 'test/purchase_from_picking.yml', 'purchase_unit_test.xml', 'test/procurement_buy.yml', + 'test/purchase_report.yml', ], 'demo': ['purchase_demo.xml'], 'installable': True, diff --git a/addons/purchase/test/purchase_report.yml b/addons/purchase/test/purchase_report.yml index b98d1f212ac..bbc15b1e936 100644 --- a/addons/purchase/test/purchase_report.yml +++ b/addons/purchase/test/purchase_report.yml @@ -6,3 +6,11 @@ (data, format) = netsvc.LocalService('report.purchase.quotation').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'purchase-request_quotation'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Purchase Order, we will print Purchase Order report +- + !python {model: purchase.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.purchase.order').create(cr, uid, [ref('purchase.order_purchase1'),ref('purchase.order_purchase2')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'purchase-purchase_order_report'+format), 'wb+').write(data) \ No newline at end of file From 9fb0234dbaa14eb8c803500c7abf3abacaf231c1 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 12:54:30 +0530 Subject: [PATCH 47/54] [FIX] project_scrum : YML test for report added bzr revid: ach@tinyerp.com-20100917072430-111mgvgc3n9v34ce --- addons/project_scrum/__openerp__.py | 1 + addons/project_scrum/test/project_scrum_report.yml | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 addons/project_scrum/test/project_scrum_report.yml diff --git a/addons/project_scrum/__openerp__.py b/addons/project_scrum/__openerp__.py index 847263ba7d3..3350419af30 100644 --- a/addons/project_scrum/__openerp__.py +++ b/addons/project_scrum/__openerp__.py @@ -60,6 +60,7 @@ "board_project_scrum_view.xml", ], 'demo_xml': ['project_scrum_demo.xml'], + 'test': ['test/project_scrum_report.yml'], 'installable': True, 'active': False, } diff --git a/addons/project_scrum/test/project_scrum_report.yml b/addons/project_scrum/test/project_scrum_report.yml new file mode 100644 index 00000000000..7fb3e9c07fc --- /dev/null +++ b/addons/project_scrum/test/project_scrum_report.yml @@ -0,0 +1,9 @@ +- + In order to test the PDF reports defined on a Project Scrum, we will print Project Scrum Sprint Burndown Report +- + !python {model: project.scrum.sprint}: | + import netsvc, tools, os + data_dict = {'model': 'project.scrum.sprint', 'id':ref('project_scrum.scrum_sprint_0')} + (data, format) = netsvc.LocalService('report.scrum.sprint.burndown').create(cr, uid, [ref('project_scrum.scrum_sprint_0')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'project_scrum-project_scrum_sprint_burndown.'+format), 'wb+').write(data) \ No newline at end of file From a2b9eaeccf3a4d0abb8ffc254e3ff46fd01dfb32 Mon Sep 17 00:00:00 2001 From: "RME (OpenERP)" Date: Fri, 17 Sep 2010 12:58:06 +0530 Subject: [PATCH 48/54] [IMP] hr_attendance, hr_holidays, hr_timesheet, hr_timesheet_invoice, hr_payroll, hr_expense : yml report test added bzr revid: rme@tinyerp.com-20100917072806-t86i3yit9ceiofk9 --- addons/hr_attendance/__openerp__.py | 4 ++- .../test/hr_attendance_error.yml | 9 ------ .../test/hr_attendance_error_report.yml | 29 +++++++++++++++++ addons/hr_expense/test/hr_expense_report.yml | 2 +- addons/hr_holidays/__openerp__.py | 4 ++- .../hr_holidays/test/hr_holidays_report.yml | 13 ++++++++ addons/hr_payroll/test/hr_payroll_report.yml | 9 +++--- addons/hr_timesheet/__openerp__.py | 4 ++- .../hr_timesheet/test/hr_timesheet_report.yml | 31 +++++++++++++++++++ .../test/hr_timesheet_invoice_report.yml | 20 ++++++++++-- 10 files changed, 104 insertions(+), 21 deletions(-) delete mode 100644 addons/hr_attendance/test/hr_attendance_error.yml create mode 100644 addons/hr_attendance/test/hr_attendance_error_report.yml create mode 100644 addons/hr_holidays/test/hr_holidays_report.yml create mode 100644 addons/hr_timesheet/test/hr_timesheet_report.yml diff --git a/addons/hr_attendance/__openerp__.py b/addons/hr_attendance/__openerp__.py index 9ed2b76e1ed..18e585effc2 100644 --- a/addons/hr_attendance/__openerp__.py +++ b/addons/hr_attendance/__openerp__.py @@ -43,7 +43,9 @@ 'wizard/hr_attendance_sign_in_out_view.xml', ], 'demo_xml': ['hr_attendance_demo.xml'], - 'test': ['test/test_hr_attendance.yml','test/hr_attendance_error.yml'], + 'test': ['test/test_hr_attendance.yml', + 'test/hr_attendance_error_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0063495605613', diff --git a/addons/hr_attendance/test/hr_attendance_error.yml b/addons/hr_attendance/test/hr_attendance_error.yml deleted file mode 100644 index 6c045871cb5..00000000000 --- a/addons/hr_attendance/test/hr_attendance_error.yml +++ /dev/null @@ -1,9 +0,0 @@ -- - In order to test the PDF reports defined on a hr attendance error, we will print a hr attendance error -- - !python {model: hr.employee}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [], {'model': 'hr.employee', 'form': {'init_date': '2010-09-16', 'end_date': '2010-09-16', 'id': 1, 'emp_ids': [ref('hr.employee2')], 'max_delay': 120}} - , {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_attendance/test/hr_attendance_error_report.yml b/addons/hr_attendance/test/hr_attendance_error_report.yml new file mode 100644 index 00000000000..d7ca06587c7 --- /dev/null +++ b/addons/hr_attendance/test/hr_attendance_error_report.yml @@ -0,0 +1,29 @@ +- + In order to test the PDF reports defined on a HR Attendance Error, we will print a HR Attendance Error +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + data_dict = {'model': 'hr.employee', 'form': {'init_date': start.strftime('%Y-%m-%d'), 'end_date':start.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee2')], 'max_delay': 120}} + (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a HR Attendance By Month, we will print a HR Attendance By Month +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + year=start.year + month=start.month + start = DateTime(int(start.year), int(start.month), int(start.day)) + data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year': year }} + (data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee2')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_expense/test/hr_expense_report.yml b/addons/hr_expense/test/hr_expense_report.yml index 52a44e0dafb..4c81ceb5976 100644 --- a/addons/hr_expense/test/hr_expense_report.yml +++ b/addons/hr_expense/test/hr_expense_report.yml @@ -5,4 +5,4 @@ import netsvc, tools, os (data, format) = netsvc.LocalService('report.hr.expense').create(cr, uid, [ref('hr_expense.hr_expense_expense_septemberexpenses0'),ref('hr_expense.hr_expense_expense_septemberexpenses1')], {}, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_expense_report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'hr_expense-report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py index 7d68b216494..e6d901ad02c 100644 --- a/addons/hr_holidays/__openerp__.py +++ b/addons/hr_holidays/__openerp__.py @@ -65,7 +65,9 @@ 'board_hr_holidays_view.xml', ], 'demo_xml': ['hr_holidays_demo.xml',], - 'test': ['test/test_hr_holiday.yml'], + 'test': ['test/test_hr_holiday.yml', + 'test/hr_holidays_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0086579209325', diff --git a/addons/hr_holidays/test/hr_holidays_report.yml b/addons/hr_holidays/test/hr_holidays_report.yml new file mode 100644 index 00000000000..fb8eb6319a0 --- /dev/null +++ b/addons/hr_holidays/test/hr_holidays_report.yml @@ -0,0 +1,13 @@ +- + In order to test the PDF reports defined on a HR Holidays, we will print a HR Holidays +- + !python {model: hr.holidays}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': start.strftime('%Y-%m-%d'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }} + (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee2')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-summary_report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml index 88a797b6827..69ca8328ea6 100644 --- a/addons/hr_payroll/test/hr_payroll_report.yml +++ b/addons/hr_payroll/test/hr_payroll_report.yml @@ -5,7 +5,7 @@ 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) + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_report.'+format), 'wb+').write(data) - In order to test the PDF reports defined on a HR Payslip, we will print a HR Payslip @@ -14,11 +14,10 @@ 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')], {}, {}) + file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data) - - Print the employee salary details + In order to test the PDF reports defined on a HR Employee Salary Details, we will print a HR Employee Salary Details - !python {model: hr.payslip}: | import netsvc, tools, os, time @@ -27,7 +26,7 @@ if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detai_report.'+format), 'wb+').write(data) - - Print the employee yearly salary details + In order to test the PDF reports defined on a HR Employee Salary Details, we will print a HR Employee Salary Details - !python {model: hr.payslip}: | import netsvc, tools, os, time diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py index c7207b6761c..5a2e37353cd 100644 --- a/addons/hr_timesheet/__openerp__.py +++ b/addons/hr_timesheet/__openerp__.py @@ -50,7 +50,9 @@ to set up a management by affair. 'wizard/hr_timesheet_sign_in_out_view.xml', ], 'demo_xml': ['hr_timesheet_demo.xml'], - 'test': ['test/test_hr_timesheet.yml'], + 'test': ['test/test_hr_timesheet.yml', + 'test/hr_timesheet_invoice_report.yml', + ], 'installable': True, 'active': False, 'certificate': '0071405533469', diff --git a/addons/hr_timesheet/test/hr_timesheet_report.yml b/addons/hr_timesheet/test/hr_timesheet_report.yml new file mode 100644 index 00000000000..04c07d77403 --- /dev/null +++ b/addons/hr_timesheet/test/hr_timesheet_report.yml @@ -0,0 +1,31 @@ +- + In order to test the PDF reports defined on a HR Timesheet User Report, we will print a HR Timesheet User Report +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + month=start.month + year=start.year + data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_id' : ref('base.user_root') }} + (data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a HR Timesheet Users Report, we will print a HR Timesheet Users Report +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + month=start.month + year=start.year + data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'user_ids' : [ref('base.user_root')] }} + (data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml index 434d04a979d..118699c4aa3 100644 --- a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml +++ b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml @@ -1,9 +1,23 @@ - - In order to test the PDF reports defined on a hr timesheet invoice, we will print a hr timesheet invoice + In order to test the PDF reports defined on a HR Timesheet Account Analytic Profit, we will print a HR Timesheet Account Analytic Profit - !python {model: account.analytic.line}: | import netsvc, tools, os, time - data_dict = {'model': 'ir.ui.menu', 'form': {'id': 1, 'date_from': '2010-09-01', 'employee_ids': [[6, 0, [1, ref('hr.employee2')]]], 'journal_ids': [[6, 0, [1, 2, 3, 4]]], 'date_to': '2010-09-16'}} + data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': '2010-09-01', 'employee_ids': [[6, 0, [1, ref('hr.employee2')]]], 'journal_ids': [[6, 0, [1, 2, 3, 4]]], 'date_to': '2010-09-16'}} (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {'periods': []}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a HR Cost Ledger, we will print a HR Cost Ledger +- + !python {model: account.analytic.account}: | + import netsvc, tools, os, time + import datetime + from mx.DateTime import * + start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = DateTime(int(start.year), int(start.month), int(start.day)) + data_dict = {'model': 'ir.ui.menu', 'form': {'date1': start.strftime('%Y-%m-%d'), 'date2': start.strftime('%Y-%m-%d')}} + (data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, [], data_dict, {'periods': []}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data) \ No newline at end of file From 8321e6c8a0466f01bb952ede106bb5caf657dfdf Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Fri, 17 Sep 2010 15:00:07 +0530 Subject: [PATCH 49/54] [REF] bzr revid: jvo@tinyerp.com-20100917093007-m4b02ivfi2h8vo3p --- addons/account_analytic_plans/__openerp__.py | 2 +- .../account_budget/wizard/account_budget_crossovered_report.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py index 41f29737d55..6e00c6b587d 100644 --- a/addons/account_analytic_plans/__openerp__.py +++ b/addons/account_analytic_plans/__openerp__.py @@ -66,7 +66,7 @@ of distribution models. 'wizard/account_crossovered_analytic_view.xml' ], 'demo_xml' : [], - 'test' : ['account_analytic_plans/test/acount_analytic_plans_report.yml'], + 'test' : ['test/acount_analytic_plans_report.yml'], 'installable': True, 'active' : False, 'certificate': '0036417675373', diff --git a/addons/account_budget/wizard/account_budget_crossovered_report.py b/addons/account_budget/wizard/account_budget_crossovered_report.py index 9a700e90ebb..2862cd1db48 100644 --- a/addons/account_budget/wizard/account_budget_crossovered_report.py +++ b/addons/account_budget/wizard/account_budget_crossovered_report.py @@ -42,7 +42,7 @@ class account_budget_crossvered_report(osv.osv_memory): data = self.read(cr, uid, ids)[0] datas = { 'ids': context.get('active_ids',[]), - 'model': 'crossovered.budge', + 'model': 'crossovered.budget', 'form': data } datas['form']['report']='analytic-full' From db13c7b51f4bb745a1a702e3ba776fc550fdba3a Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 15:17:57 +0530 Subject: [PATCH 50/54] [IMP] project_plannning : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100917094757-8ro6i925et0osp0w --- addons/project_planning/__openerp__.py | 1 + addons/project_planning/project_planning_demo.xml | 8 ++++++++ addons/project_planning/test/project_plannning_report.yml | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100644 addons/project_planning/test/project_plannning_report.yml diff --git a/addons/project_planning/__openerp__.py b/addons/project_planning/__openerp__.py index 4624de97f8c..3f378cc21be 100644 --- a/addons/project_planning/__openerp__.py +++ b/addons/project_planning/__openerp__.py @@ -55,6 +55,7 @@ At the end of the month, the planning manager can also check if the encoded time ], 'test': [ 'test/planning_states.yml' + 'test/planning_report.yml' ], 'installable': True, 'active': False, diff --git a/addons/project_planning/project_planning_demo.xml b/addons/project_planning/project_planning_demo.xml index 9a64217f252..1c12e5c53cf 100644 --- a/addons/project_planning/project_planning_demo.xml +++ b/addons/project_planning/project_planning_demo.xml @@ -8,5 +8,13 @@ + + Project_Planning + 20 + 2010-01-01' + 2010-12-31 + draft + + diff --git a/addons/project_planning/test/project_plannning_report.yml b/addons/project_planning/test/project_plannning_report.yml new file mode 100644 index 00000000000..770522c0d17 --- /dev/null +++ b/addons/project_planning/test/project_plannning_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on a Project Planning, we will print Project Planning report +- + !python {model: report_account_analytic.planning}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.report_account_analytic.planning.print').create(cr, uid, [ref('project_planning.project_plannning_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'project_planning-project_planning_report'+format), 'wb+').write(data) \ No newline at end of file From d73c7af13ced989a808c6e367d72ffec18ed9258 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 15:31:49 +0530 Subject: [PATCH 51/54] [FIX] product,project_plannning : corrected yml reporttest file bzr revid: ach@tinyerp.com-20100917100149-u73wv83t30w8oqho --- addons/product/test/product_report.yml | 4 ++-- addons/project_planning/test/project_plannning_report.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/product/test/product_report.yml b/addons/product/test/product_report.yml index 9ff387278aa..6e80083f66b 100644 --- a/addons/product/test/product_report.yml +++ b/addons/product/test/product_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on Products, we will print a Products Pricelists report + In order to test the PDF reports defined on Products, we will print a Products Pricelists Report - !python {model: product.product}: | import netsvc, tools, os @@ -14,4 +14,4 @@ } (data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'product-product pricelist'+format), 'wb+').write(data) + file(os.path.join(tools.config['test_report_directory'], 'product-product_pricelist'+format), 'wb+').write(data) diff --git a/addons/project_planning/test/project_plannning_report.yml b/addons/project_planning/test/project_plannning_report.yml index 770522c0d17..a7597af86e8 100644 --- a/addons/project_planning/test/project_plannning_report.yml +++ b/addons/project_planning/test/project_plannning_report.yml @@ -1,6 +1,6 @@ - - In order to test the PDF reports defined on a Project Planning, we will print Project Planning report -- + In order to test the PDF reports defined on a Project Planning, we will print Project Planning Report +- !python {model: report_account_analytic.planning}: | import netsvc, tools, os (data, format) = netsvc.LocalService('report.report_account_analytic.planning.print').create(cr, uid, [ref('project_planning.project_plannning_1')], {}, {}) From 8120b4dcc3cc533453276a1c4fd6fe7acd1f5596 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 15:34:23 +0530 Subject: [PATCH 52/54] [REF] Removed unnecessary yml file from sale bzr revid: ach@tinyerp.com-20100917100423-2w796eeark0oobv4 --- addons/sale/test/sale_order_print.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 addons/sale/test/sale_order_print.yml diff --git a/addons/sale/test/sale_order_print.yml b/addons/sale/test/sale_order_print.yml deleted file mode 100644 index def94d8c27e..00000000000 --- a/addons/sale/test/sale_order_print.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a sale order, we will print a sale order -- - !python {model: sale.order}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data) From 5ce0c19a154c52fb22f5c51b5e10837e9236a04a Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Fri, 17 Sep 2010 16:28:55 +0530 Subject: [PATCH 53/54] [IMP/FIX] Hr_holidays,hr_attendance report yml corrected bzr revid: jvo@tinyerp.com-20100917105855-wra7gjdhk9lgovcn --- addons/hr_attendance/__openerp__.py | 2 +- .../test/hr_attendance_error_report.yml | 29 ------------------- .../test/hr_attendance_report.yml | 19 ++++++++++++ .../hr_holidays/test/hr_holidays_report.yml | 17 ++++++----- 4 files changed, 29 insertions(+), 38 deletions(-) delete mode 100644 addons/hr_attendance/test/hr_attendance_error_report.yml create mode 100644 addons/hr_attendance/test/hr_attendance_report.yml diff --git a/addons/hr_attendance/__openerp__.py b/addons/hr_attendance/__openerp__.py index 18e585effc2..3714050cbdb 100644 --- a/addons/hr_attendance/__openerp__.py +++ b/addons/hr_attendance/__openerp__.py @@ -44,7 +44,7 @@ ], 'demo_xml': ['hr_attendance_demo.xml'], 'test': ['test/test_hr_attendance.yml', - 'test/hr_attendance_error_report.yml' + 'test/hr_attendance_report.yml' ], 'installable': True, 'active': False, diff --git a/addons/hr_attendance/test/hr_attendance_error_report.yml b/addons/hr_attendance/test/hr_attendance_error_report.yml deleted file mode 100644 index d7ca06587c7..00000000000 --- a/addons/hr_attendance/test/hr_attendance_error_report.yml +++ /dev/null @@ -1,29 +0,0 @@ -- - In order to test the PDF reports defined on a HR Attendance Error, we will print a HR Attendance Error -- - !python {model: hr.employee}: | - import netsvc, tools, os, time - import datetime - from mx.DateTime import * - start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) - start = DateTime(int(start.year), int(start.month), int(start.day)) - data_dict = {'model': 'hr.employee', 'form': {'init_date': start.strftime('%Y-%m-%d'), 'end_date':start.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee2')], 'max_delay': 120}} - (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [], data_dict, {'periods': []}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data) - -- - In order to test the PDF reports defined on a HR Attendance By Month, we will print a HR Attendance By Month -- - !python {model: hr.employee}: | - import netsvc, tools, os, time - import datetime - from mx.DateTime import * - start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) - year=start.year - month=start.month - start = DateTime(int(start.year), int(start.month), int(start.day)) - data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year': year }} - (data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee2')]}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data) \ No newline at end of file diff --git a/addons/hr_attendance/test/hr_attendance_report.yml b/addons/hr_attendance/test/hr_attendance_report.yml new file mode 100644 index 00000000000..d26f6ddb9bc --- /dev/null +++ b/addons/hr_attendance/test/hr_attendance_report.yml @@ -0,0 +1,19 @@ +- + In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + data_dict = {'model': 'hr.employee', 'form': {'month': time.gmtime()[1], 'year': time.gmtime()[0]}} + (data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance Error +- + !python {model: hr.employee}: | + import netsvc, tools, os, time + data_dict = {'model': 'hr.employee', 'form': {'init_date': time.strftime('%Y-01-01'), 'end_date':time.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee1')], 'max_delay': 120}} + (data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [ref('hr.employee1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data) diff --git a/addons/hr_holidays/test/hr_holidays_report.yml b/addons/hr_holidays/test/hr_holidays_report.yml index fb8eb6319a0..9faf7358b53 100644 --- a/addons/hr_holidays/test/hr_holidays_report.yml +++ b/addons/hr_holidays/test/hr_holidays_report.yml @@ -1,13 +1,14 @@ - - In order to test the PDF reports defined on a HR Holidays, we will print a HR Holidays + In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays - !python {model: hr.holidays}: | import netsvc, tools, os, time - import datetime - from mx.DateTime import * - start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) - start = DateTime(int(start.year), int(start.month), int(start.day)) - data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': start.strftime('%Y-%m-%d'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }} - (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee2')]}) + data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }} + (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-summary_report.'+format), 'wb+').write(data) \ No newline at end of file + file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-dept_summary_report.'+format), 'wb+').write(data) + + data_dict = {'model': 'hr.employee', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated','emp':[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')] }} + (data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-employee_summary_report.'+format), 'wb+').write(data) \ No newline at end of file From 5c3a3e3c4d5ef1e098dc158968e18c8497c93a58 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Fri, 17 Sep 2010 16:40:37 +0530 Subject: [PATCH 54/54] [REF] bzr revid: jvo@tinyerp.com-20100917111037-z6wylxt1t950cn62 --- addons/hr_payroll/test/hr_payroll_report.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_payroll/test/hr_payroll_report.yml b/addons/hr_payroll/test/hr_payroll_report.yml index 69ca8328ea6..e2268db7697 100644 --- a/addons/hr_payroll/test/hr_payroll_report.yml +++ b/addons/hr_payroll/test/hr_payroll_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on a HR Employee Salary, we will print a HR Employee Salary + In order to test the PDF reports defined on HR Employee Salary, we will print HR Employee Salary - !python {model: hr.employee}: | import netsvc, tools, os @@ -8,7 +8,7 @@ file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_report.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a HR Payslip, we will print a HR Payslip + In order to test the PDF reports defined on HR Payslip, we will print a HR Payslip - !python {model: hr.payslip}: | import netsvc, tools, os @@ -17,7 +17,7 @@ file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a HR Employee Salary Details, we will print a HR Employee Salary Details + In order to test the PDF reports defined on HR Employee Salary Details, we will print HR Employee Salary Details - !python {model: hr.payslip}: | import netsvc, tools, os, time @@ -26,7 +26,7 @@ if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detai_report.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a HR Employee Salary Details, we will print a HR Employee Salary Details + In order to test the PDF reports defined on HR Employee Salary Details, we will print HR Employee Salary Details - !python {model: hr.payslip}: | import netsvc, tools, os, time