[IMP] lunch,mrp,mrp_operations,mrp_repair : yml report test added

bzr revid: dhs@tinyerp.com-20100915123452-odrbked6wcx0wg60
This commit is contained in:
DHS (OpenERP)
2010-09-15 18:04:52 +05:30
parent 59d97f99ff
commit 67fe69cc61
8 changed files with 69 additions and 10 deletions
+2 -3
View File
@@ -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:
+8
View File
@@ -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)
+2 -1
View File
@@ -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,
+26
View File
@@ -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)
+1 -1
View File
@@ -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',
@@ -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)
+5 -5
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -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',
@@ -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)