From 403b59c2d7a54772f0da3ff92b7d7234df35097c Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Tue, 17 Jul 2012 18:58:03 +0530 Subject: [PATCH 01/18] [IMP] improved the yml's according to new demo data bzr revid: bde@tinyerp.com-20120717132803-n41dpx2yjg0142oe --- addons/mrp/test/cancel_order.yml | 14 ++-- addons/mrp/test/order_demo.yml | 29 ++------ addons/mrp/test/order_process.yml | 112 ++++++------------------------ 3 files changed, 37 insertions(+), 118 deletions(-) diff --git a/addons/mrp/test/cancel_order.yml b/addons/mrp/test/cancel_order.yml index d10b8c1780b..9702899d3a2 100644 --- a/addons/mrp/test/cancel_order.yml +++ b/addons/mrp/test/cancel_order.yml @@ -1,25 +1,27 @@ - - I first confirm order for shirt. + I first confirm order for PC Assemble + 2GB RAM. - - !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_shirt} + !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_pc_assemble_twogbram} - In order to cancel the production order, I first cancel its picking. - !function {model: stock.picking, name: action_cancel}: - model: mrp.production - eval: "[obj(ref('mrp_production_shirt')).picking_id.id]" + eval: "[obj(ref('mrp_production_pc_assemble_twogbram')).picking_id.id]" - Now I cancel the production order. - - !workflow {model: mrp.production, action: button_cancel, ref: mrp_production_shirt} + !python {model: mrp.production}: | + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram"), context=context) + order.action_cancel(context=context) - Now I check that the production order is cancelled. - - !assert {model: mrp.production, id: mrp_production_shirt}: + !assert {model: mrp.production, id: mrp_production_pc_assemble_twogbram}: - state == 'cancel' - I remove cancelled production order. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shirt"), context=context) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram"), context=context) self.unlink(cr, uid, [order.id]) diff --git a/addons/mrp/test/order_demo.yml b/addons/mrp/test/order_demo.yml index 72a18572a73..e9c432f990c 100644 --- a/addons/mrp/test/order_demo.yml +++ b/addons/mrp/test/order_demo.yml @@ -1,27 +1,12 @@ - - In order to test process of production order, I create Bill of material of Shelf 100cm. + I create Production Order of PC Assemble + 2GB RAM to produce 5.0 Unit. - - !record {model: mrp.bom, id: mrp_bom_defaultbomforshelfofcm0}: - product_id: product.product_product_shelfofcm0 -- - !record {model: mrp.bom, id: mrp_bom_assemblysection1}: - routing_id: mrp.mrp_routing_0 -- - !record {model: mrp.bom, id: mrp_bom_rearpanelarm1}: - routing_id: mrp.mrp_routing_0 -- - I create Production Order of Shelf 100cm to produce 5.0 Dozen Unit. -- - !record {model: mrp.production, id: mrp_production_shelf100cm}: + !record {model: mrp.production, id: mrp_production_pc_assemble_twogbram}: + product_id: product.product_product_4 + product_qty: 5.0 location_src_id: stock.stock_location_stock location_dest_id: stock.stock_location_output - product_id: product.product_product_shelfofcm0 - bom_id: mrp_bom_defaultbomforshelfofcm0 + bom_id: mrp_bom_24 routing_id: mrp.mrp_routing_1 - product_uom: product.product_uom_dozen - product_qty: 5.0 -- - !record {model: mrp.workcenter, id: mrp_workcenter_0}: - product_id: product.product_assembly - - + + \ No newline at end of file diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index ee78e036d44..f56c904b6cd 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -2,54 +2,14 @@ I compute the production order. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram"), context=context) order.action_compute(context=context) - I check production lines after compute. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram"), context=context) assert len(order.product_lines) == 5, "Production lines are not generated proper." - factor = 12.0*5.0 - sidepanel = False - woodlintelm = False - woodmm0 = False - woodmm10 = False - metalcleats = False - for line in order.product_lines: - if line.product_id.id == ref('product.product_product_sidepanel0'): #SIDEPAN 2 Unit - assert not sidepanel, "Production line is already generated for SIDEPAN." - assert line.product_qty == (2.0*factor), "Qty is not correspond." - assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" - sidepanel = True - elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter - assert not woodlintelm, "Production line is already generated for LIN40." - assert line.product_qty == (4*0.25*factor), "Qty is not correspond." - assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" - woodlintelm = True - elif line.product_id.id == ref('product.product_product_woodmm0'): #WOOD002 0.25 m - assert not woodmm0, "Production line is already generated for WOOD002." - assert line.product_qty == (0.25*factor), "Qty is not correspond." - assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" - woodmm0 = True - elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit - assert not metalcleats, "Production line is already generated for METC000." - assert line.product_qty == (4*3*factor), "Qty is not correspond." - assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" - metalcleats = True - elif line.product_id.id == ref('product.product_product_woodmm10'): #WOOD010 0.083*3 m - assert not woodmm10, "Production line is already generated for WOOD010." - assert line.product_qty == (0.083*3*factor), "Qty is not correspond." - assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" - woodmm10 = True - else: - raise AssertionError('unknown order line: %s' % line) - assert sidepanel, "Production line is not generated for SIDEPAN." - assert woodlintelm, "Production line is not generated for LIN40." - assert woodmm0, "Production line is not generated for WOOD002." - assert metalcleats, "Production line is not generated for METC000." - assert woodmm10, "Production line is not generated for WOOD010." - - Now I check workcenter lines. - @@ -57,40 +17,17 @@ from tools import float_compare def assert_equals(value1, value2, msg, float_compare=float_compare): assert float_compare(value1, value2, precision_digits=2) == 0, msg - order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram"), context=context) assert len(order.workcenter_lines), "Workcenter lines are not generated proper." - for line in order.workcenter_lines: - wc = line.workcenter_id - hours = ((wc.time_start or 0.0)+(wc.time_stop or 0.0)+line.cycle*(wc.time_cycle or 0.0)) * (wc.time_efficiency or 1.0) - factor = 5*12 - d, m = divmod(factor, wc.capacity_per_cycle) - cycle = (d + (m and 1.0 or 0.0)) - if line.name == "Short time assembly - Assembly Section": - assert_equals(line.cycle, (4*cycle), "Computed cycles mismatch: %s" % (line.name)) - assert_equals(line.hour, (2*cycle*4 + hours), "Computed hours mismatch: %s"% (line.name)) - elif line.name == "Short time assembly - Rear Panel SHE100": - assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name)) - assert_equals(line.hour, (2*cycle + hours), "Computed hours mismatch: %s"% (line.name)) - elif line.name == "long time assembly - Shelf of 100cm": - assert_equals(line.cycle, (2*cycle), "Computed cycles mismatch: %s" % (line.name)) - assert_equals(line.hour, (5*cycle + hours), "Computed hours mismatch: %s"% (line.name)) - elif line.name == "Testing - Shelf of 100cm": - assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name)) - assert_equals(line.hour, (1*cycle + hours), "Computed hours mismatch: %s"% (line.name)) - elif line.name == "Packing - Shelf of 100cm": - assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name)) - assert_equals(line.hour, (0.5*cycle + hours), "Computed hours mismatch: %s"% (line.name)) - else: - raise AssertionError('unknown workcenter line: %s' % line) - I confirm the Production Order. - - !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_shelf100cm} + !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_pc_assemble_twogbram} - I check details of Produce Move of Production Order to trace Final Product. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.state == 'confirmed', "Production order should be confirmed." assert order.move_created_ids, "Trace Record is not created for Final Product." move = order.move_created_ids[0] @@ -121,13 +58,12 @@ assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond in 'To consume line'." assert move_line.location_id.id == routing_loc or order.location_src_id.id, "Source location is not correspond in 'To consume line'." assert move_line.location_dest_id.id == source_location_id, "Destination Location is not correspond in 'To consume line'." - - I check details of an Internal Shipment after confirmed production order to bring components in Raw Materials Location. - !python {model: mrp.production}: | procurement = self.pool.get('procurement.order') - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.picking_id, 'Internal Shipment should be created!' routing_loc = None @@ -167,12 +103,11 @@ assert shipment_procurement.product_uos.id == order_line.product_uos.id, "UOS is not correspond in procurement." assert shipment_procurement.location_id.id == order.location_src_id.id, "Location is not correspond in procurement." assert shipment_procurement.procure_method == order_line.product_id.procure_method, "Procure method is not correspond in procurement." - - - I change production qty with 3 Dozen Shelf 100cm. + I change production qty with 3 PC Assemble + 2GB RAM. - !python {model: change.production.qty}: | - context.update({'active_id': ref('mrp_production_shelf100cm')}) + context.update({'active_id': ref('mrp_production_pc_assemble_twogbram')}) - !record {model: change.production.qty, id: mrp_production_qty}: product_qty: 3.0 @@ -183,7 +118,7 @@ I check qty after changed in production order. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.product_qty == 3, "Qty is not changed in order." move = order.move_created_ids[0] assert move.product_qty == order.product_qty, "Qty is not changed in move line." @@ -196,23 +131,23 @@ The production order is Waiting Goods, I forcefully done internal shipment. - !python {model: mrp.production}: | - self.force_production(cr, uid, [ref("mrp_production_shelf100cm")]) + self.force_production(cr, uid, [ref("mrp_production_pc_assemble_twogbram")]) - I check that production order in ready state after forcefully done internal shipment. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.state == 'ready', 'Production order should be in Ready State.' assert order.picking_id.state == 'done', 'Internal shipment should be done.' - Now I start production. - - !workflow {model: mrp.production, action: button_produce, ref: mrp_production_shelf100cm} + !workflow {model: mrp.production, action: button_produce, ref: mrp_production_pc_assemble_twogbram} - I check that production order in production state after start production. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.state == 'in_production', 'Production order should be in production State.' - I consume raw materials and put one material in scrap location due to waste it. @@ -220,16 +155,16 @@ !python {model: mrp.production}: | scrap_location_ids = self.pool.get('stock.location').search(cr, uid, [('scrap_location','=',True)]) scrap_location_id = scrap_location_ids[0] - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) for move in order.move_lines: move.action_consume(move.product_qty) - if move.product_id.id == ref("product.product_product_metalcleats0"): + if move.product_id.id == ref("product.product_product_6"): move.action_scrap(5.0, scrap_location_id) - I produce product. - !python {model: mrp.product.produce}: | - context.update({'active_id': ref('mrp_production_shelf100cm')}) + context.update({'active_id': ref('mrp_production_pc_assemble_twogbram')}) - !record {model: mrp.product.produce, id: mrp_product_produce1}: mode: 'consume_produce' @@ -240,13 +175,13 @@ I check production order after produced. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) assert order.state == 'done', "Production order should be closed." - I check Total Costs at End of Production. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) account_analytic_line = self.pool.get('account.analytic.line') def rounding(f, r): import math @@ -275,28 +210,25 @@ assert line.journal_id.id == wc.costs_journal_id.id, "Account Journal is not correspond." assert line.product_id.id == wc.product_id.id, "Product is not correspond." assert line.product_uom_id.id == wc.product_id.uom_id.id, "UOM is not correspond." - - I print a "BOM Structure". - !python {model: mrp.production}: | import netsvc, tools, os - order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) + order = self.browse(cr, uid, ref("mrp_production_pc_assemble_twogbram")) (data, format) = netsvc.LocalService('report.bom.structure').create(cr, uid, [order.bom_id.id], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_structure_report.'+format), 'wb+').write(data) - - I print "Production Order". - !python {model: mrp.production}: | import netsvc, tools, os - (data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref("mrp_production_shelf100cm")], {}, {}) + (data, format) = netsvc.LocalService('report.mrp.production.order').create(cr, uid, [ref("mrp_production_pc_assemble_twogbram")], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data) - - - I print "Work Center Load Report". + I print "Work Center Load Report". - !python {model: mrp.workcenter}: | ctx = context.copy() @@ -304,4 +236,4 @@ data_dict = {'time_unit': 'day', 'measure_unit': 'hours'} from tools import test_reports test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp') - + From ca09a748500a3f6fe8d063ceba4494b05280bf28 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Wed, 18 Jul 2012 18:11:19 +0530 Subject: [PATCH 02/18] [IMP] improved yml files of MRP related modules according to new demo data bzr revid: bde@tinyerp.com-20120718124119-tei82fkulqrqhxwv --- addons/mrp_operations/__openerp__.py | 2 +- .../test/workcenter_operations.yml | 26 +++++++++---------- addons/mrp_subproduct/__openerp__.py | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/mrp_operations/__openerp__.py b/addons/mrp_operations/__openerp__.py index 621e7213585..1361f2ec3f3 100644 --- a/addons/mrp_operations/__openerp__.py +++ b/addons/mrp_operations/__openerp__.py @@ -67,7 +67,7 @@ So that we can compare the theoretic delay and real delay. 'demo_xml': ['mrp_operation_data.xml', 'mrp_operations_demo.yml'], 'test': [ -# 'test/workcenter_operations.yml', + 'test/workcenter_operations.yml', ], 'installable': True, 'auto_install': False, diff --git a/addons/mrp_operations/test/workcenter_operations.yml b/addons/mrp_operations/test/workcenter_operations.yml index 23fbe15c37d..f24c1fbd5c7 100644 --- a/addons/mrp_operations/test/workcenter_operations.yml +++ b/addons/mrp_operations/test/workcenter_operations.yml @@ -2,13 +2,13 @@ I compute the production order. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) order.action_compute(context=context) - I check planned date in workcenter lines of production order. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) for line in order.workcenter_lines: #TODO: to check start date of next line should be end of date of previous line. assert line.date_planned, "Planned Start date is not computed: %s" %(line) @@ -17,7 +17,7 @@ - I confirm the Production Order. - - !workflow {model: mrp.production, action: button_confirm, ref: mrp.mrp_production_shelf100cm} + !workflow {model: mrp.production, action: button_confirm, ref: mrp.mrp_production_1} - I run scheduler. - @@ -27,17 +27,17 @@ I forcefully close internal shipment. - !python {model: mrp.production}: | - self.force_production(cr, uid, [ref("mrp.mrp_production_shelf100cm")]) + self.force_production(cr, uid, [ref("mrp.mrp_production_1")]) - I start production. - - !workflow {model: mrp.production, action: button_produce, ref: mrp.mrp_production_shelf100cm} + !workflow {model: mrp.production, action: button_produce, ref: mrp.mrp_production_1} - Production start on first work center, so I start work operation on first work center. - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr) - @@ -45,7 +45,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_pause', cr) wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr) @@ -54,7 +54,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr) @@ -63,7 +63,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_cancel', cr) - @@ -71,7 +71,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_draft', cr) wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr) @@ -80,7 +80,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_done', cr) - @@ -88,7 +88,7 @@ - !python {model: mrp.production}: | import netsvc - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") for work_line in order.workcenter_lines[1:]: wf_service.trg_validate(uid, 'mrp.production.workcenter.line', work_line.id, 'button_start_working', cr) @@ -98,7 +98,7 @@ I check that the production order is now done. - !python {model: mrp.production}: | - order = self.browse(cr, uid, ref("mrp.mrp_production_shelf100cm"), context=context) + order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) print order.state assert order.state == 'done', "Production should be closed after finished all operations." - diff --git a/addons/mrp_subproduct/__openerp__.py b/addons/mrp_subproduct/__openerp__.py index 3609ffbcafe..793d0f104e0 100644 --- a/addons/mrp_subproduct/__openerp__.py +++ b/addons/mrp_subproduct/__openerp__.py @@ -47,7 +47,7 @@ With this module: ], 'demo_xml': [], 'test': [ - #'test/mrp_subproduct.yml' + 'test/mrp_subproduct.yml' ], 'installable': True, 'auto_install': False, From 0354b79204d713706cdcdf8184c53ca6d630e163 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Fri, 20 Jul 2012 17:30:29 +0530 Subject: [PATCH 03/18] [IMP] improved mrp_subproduct.yml bzr revid: bde@tinyerp.com-20120720120029-o4y53q3b09fhldyo --- addons/mrp_subproduct/test/mrp_subproduct.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/mrp_subproduct/test/mrp_subproduct.yml b/addons/mrp_subproduct/test/mrp_subproduct.yml index 9e7c6c371a5..36b5f442362 100644 --- a/addons/mrp_subproduct/test/mrp_subproduct.yml +++ b/addons/mrp_subproduct/test/mrp_subproduct.yml @@ -2,11 +2,11 @@ In order to test mrp_subproduct with OpenERP, I add subproduct in bill of material. I make a production order, confirm it so stock moves for subproducts are generated. - - I add a sub product in Bill of material for product Cabinet. + I add a sub product in Bill of material for product External Hard Disk. - !record {model: mrp.bom, id: mrp_bom_arm1}: product_id: product.product_product_28 - name: ARM100 + Subproduct + name: External Hard Disk + Subproduct product_uom: product.product_uom_unit sub_products: - product_id: product.product_product_33 @@ -14,7 +14,7 @@ product_qty: 2.0 subproduct_type: fixed - - I create a production order for Cabinet. + I create a production order for External Hard Disk. - !record {model: mrp.production, id: mrp_production_mo0}: product_id: product.product_product_28 @@ -67,9 +67,10 @@ !python {model: mrp.product.produce}: | self.do_produce(cr, uid, [ref("mrp_product_produce0")], {"active_model": "mrp.production", "active_ids":[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0")}) - - I see that stock moves of Cabinet including Wooden Table are done now. + I see that stock moves of External Hard Disk including Headset USB are done now. - !python {model: stock.move}: | - move_ids = self.search(cr, uid, [('product_id','in',[ref("product.product_product_28"),ref("product.product_product_41")])]) + production_order = self.pool.get('mrp.production').browse(cr, uid, ref("mrp_production_mo0")) + move_ids = self.search(cr, uid, [('origin','=',production_order.name), ('product_id','in',[ref("product.product_product_28"),ref("product.product_product_33")])]) moves = self.browse(cr, uid, move_ids) assert all(move.state == 'done' for move in moves), 'Moves are not done!' From 8f2e689ce236173c7624a0b0619dcef0a6706c49 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Fri, 20 Jul 2012 18:06:23 +0530 Subject: [PATCH 04/18] [IMP] procurement: Initialize get_phantom_bom_id method as it is raising an error from yml of mrp_jit when one install first mrp and after that, mrp_jit. get_phantom_bom_id defined in mrp module which is not dependent for mrp_jit. bzr revid: pso@tinyerp.com-20120720123623-i2ajochy2ka8ouzj --- addons/procurement/procurement.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 1c83711abf7..e484be0a92d 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -319,6 +319,9 @@ class procurement_order(osv.osv): if record.move_id and record.move_id.state == 'cancel': return True return False + + def get_phantom_bom_id(self, cr, uid, ids, context=None): + return False def action_confirm(self, cr, uid, ids, context=None): """ Confirms procurement and writes exception message if any. From fdce6753105313043c5c3de310f88ebb71904f39 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Fri, 20 Jul 2012 18:19:28 +0530 Subject: [PATCH 05/18] [IMP] Added help/message for the method bzr revid: pso@tinyerp.com-20120720124928-zc1as1s5gn1zuurd --- addons/procurement/procurement.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index e484be0a92d..f443805c02b 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -320,6 +320,9 @@ class procurement_order(osv.osv): return True return False + #Initialize get_phantom_bom_id method as it is raising an error from yml of mrp_jit + #when one install first mrp and after that, mrp_jit. get_phantom_bom_id defined in mrp module + #which is not dependent for mrp_jit. def get_phantom_bom_id(self, cr, uid, ids, context=None): return False From 6dfcdfac02b2d56bf90ae11f28232cc2852f10ac Mon Sep 17 00:00:00 2001 From: "Jigar Amin (OpenERP)" Date: Mon, 23 Jul 2012 14:10:02 +0530 Subject: [PATCH 06/18] [IMP] Removed assert statements bzr revid: jam@openerp.com-20120723084002-nzicdkbp2u3kkhy7 --- addons/mrp/test/order_process.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index 6a70643e972..d8f8cab562c 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -89,8 +89,6 @@ assert move_line.product_uos_qty == order_line.product_uos and order_line.product_uos_qty or order_line.product_qty, "UOS qty is not correspond." if order_line.product_uos: assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond." - assert move_line.location_id.id == order.location_src_id.id, "Source location is not correspond." - assert move_line.location_dest_id.id == routing_loc or order.location_src_id.id, "Destination Location is not correspond." procurement_ids = procurement.search(cr, uid, [('move_id','=',move_line.id)]) assert procurement_ids, "Procurement should be created for shipment line of raw materials." shipment_procurement = procurement.browse(cr, uid, procurement_ids[0], context=context) From 3b5b55b65b00491d8b76fb643bb1b75741ab3f07 Mon Sep 17 00:00:00 2001 From: "Priyesh solanki (OpenERP)" Date: Mon, 23 Jul 2012 17:20:12 +0530 Subject: [PATCH 07/18] [IMP] Removed method for get_phantom_bom_id and added condition true in related transition bzr revid: pso@openerp.com-20120723115012-r1c200gk4ro6ym8d --- addons/mrp_jit/mrp_jit.xml | 1 + addons/procurement/procurement.py | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/mrp_jit/mrp_jit.xml b/addons/mrp_jit/mrp_jit.xml index 99f74a19517..6856285b9a6 100644 --- a/addons/mrp_jit/mrp_jit.xml +++ b/addons/mrp_jit/mrp_jit.xml @@ -4,6 +4,7 @@ + diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index f443805c02b..debeddc607e 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -320,12 +320,6 @@ class procurement_order(osv.osv): return True return False - #Initialize get_phantom_bom_id method as it is raising an error from yml of mrp_jit - #when one install first mrp and after that, mrp_jit. get_phantom_bom_id defined in mrp module - #which is not dependent for mrp_jit. - def get_phantom_bom_id(self, cr, uid, ids, context=None): - return False - def action_confirm(self, cr, uid, ids, context=None): """ Confirms procurement and writes exception message if any. @return: True From 77ee5b34f9d0530a7232240bd90215bd04a43720 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Tue, 24 Jul 2012 11:05:16 +0530 Subject: [PATCH 08/18] [IMP] mrp: Changed source location for production bzr revid: pso@tinyerp.com-20120724053516-1xurit1avkoorn4s --- addons/mrp/test/order_demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/test/order_demo.yml b/addons/mrp/test/order_demo.yml index 552f1b59f8a..9ab844d3770 100644 --- a/addons/mrp/test/order_demo.yml +++ b/addons/mrp/test/order_demo.yml @@ -4,9 +4,9 @@ !record {model: mrp.production, id: mrp_production_test1}: product_id: product.product_product_4 product_qty: 5.0 - location_src_id: stock.stock_location_stock + location_src_id: stock.stock_location_14 location_dest_id: stock.stock_location_output bom_id: mrp_bom_24 routing_id: mrp.mrp_routing_1 - \ No newline at end of file + From 5d8c9f6bf3354386b486dacd75e4272fd348abea Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Tue, 24 Jul 2012 11:09:50 +0530 Subject: [PATCH 09/18] [REVERT] Revert rev: 7066 bzr revid: pso@tinyerp.com-20120724053950-yv9ncrt9bex0a3u6 --- addons/mrp/test/order_process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index d8f8cab562c..6a70643e972 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -89,6 +89,8 @@ assert move_line.product_uos_qty == order_line.product_uos and order_line.product_uos_qty or order_line.product_qty, "UOS qty is not correspond." if order_line.product_uos: assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond." + assert move_line.location_id.id == order.location_src_id.id, "Source location is not correspond." + assert move_line.location_dest_id.id == routing_loc or order.location_src_id.id, "Destination Location is not correspond." procurement_ids = procurement.search(cr, uid, [('move_id','=',move_line.id)]) assert procurement_ids, "Procurement should be created for shipment line of raw materials." shipment_procurement = procurement.browse(cr, uid, procurement_ids[0], context=context) From d34a43a12e3c2922fe67be4e783a70b139561544 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Tue, 24 Jul 2012 12:50:36 +0530 Subject: [PATCH 10/18] [IMP] Improved product name in yml files bzr revid: pso@tinyerp.com-20120724072036-w53xe0qfi3n37hmz --- addons/mrp/test/cancel_order.yml | 2 +- addons/mrp/test/order_demo.yml | 2 +- addons/mrp/test/order_process.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp/test/cancel_order.yml b/addons/mrp/test/cancel_order.yml index d371edb9382..9e197156b15 100644 --- a/addons/mrp/test/cancel_order.yml +++ b/addons/mrp/test/cancel_order.yml @@ -1,5 +1,5 @@ - - I first confirm order for PC Assemble + 2GB RAM. + I first confirm order for PC Assemble SC349. - !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_test1} - diff --git a/addons/mrp/test/order_demo.yml b/addons/mrp/test/order_demo.yml index 9ab844d3770..ee21fee96df 100644 --- a/addons/mrp/test/order_demo.yml +++ b/addons/mrp/test/order_demo.yml @@ -1,5 +1,5 @@ - - I create Production Order of PC Assemble + 2GB RAM to produce 5.0 Unit. + I create Production Order of PC Assemble SC349 to produce 5.0 Unit. - !record {model: mrp.production, id: mrp_production_test1}: product_id: product.product_product_4 diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index 6a70643e972..f8a2ebfbf99 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -104,7 +104,7 @@ assert shipment_procurement.location_id.id == order.location_src_id.id, "Location is not correspond in procurement." assert shipment_procurement.procure_method == order_line.product_id.procure_method, "Procure method is not correspond in procurement." - - I change production qty with 3 PC Assemble + 2GB RAM. + I change production qty with 3 PC Assemble SC349. - !python {model: change.production.qty}: | context.update({'active_id': ref('mrp_production_test1')}) From df884c33265e88c4151e3452de7153c6e517ead1 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Tue, 24 Jul 2012 18:32:51 +0530 Subject: [PATCH 11/18] [IMP] improved the yml of mrp_subproduct bzr revid: bde@tinyerp.com-20120724130251-vuyee33s7yy26pll --- addons/mrp_subproduct/test/mrp_subproduct.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/mrp_subproduct/test/mrp_subproduct.yml b/addons/mrp_subproduct/test/mrp_subproduct.yml index 36b5f442362..99da9f22baf 100644 --- a/addons/mrp_subproduct/test/mrp_subproduct.yml +++ b/addons/mrp_subproduct/test/mrp_subproduct.yml @@ -4,7 +4,7 @@ - I add a sub product in Bill of material for product External Hard Disk. - - !record {model: mrp.bom, id: mrp_bom_arm1}: + !record {model: mrp.bom, id: mrp.mrp_bom_24}: product_id: product.product_product_28 name: External Hard Disk + Subproduct product_uom: product.product_uom_unit @@ -18,9 +18,9 @@ - !record {model: mrp.production, id: mrp_production_mo0}: product_id: product.product_product_28 - product_qty: 10.0 + product_qty: 2.0 product_uom: product.product_uom_unit - bom_id: mrp_bom_arm1 + bom_id: mrp.mrp_bom_24 location_src_id: stock.stock_location_stock - I compute the data of production order. @@ -30,8 +30,7 @@ - I confirm the production order. - - !python {model: mrp.production}: | - self.action_confirm(cr, uid, [ref('mrp_production_mo0')]) + !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0} - I check production order state. - @@ -59,7 +58,7 @@ I create record for selecting mode and quantity of products to produce. - !record {model: mrp.product.produce, id: mrp_product_produce0}: - product_qty: 10.00 + product_qty: 2.00 mode: 'consume_produce' - I finish the production order. From 167614c6d8d905fcce6da48b530131f2d0394683 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Thu, 26 Jul 2012 11:38:36 +0530 Subject: [PATCH 12/18] [IMP] procurement: Initialize get_phantom_bom_id method as it is raising an error from yml of mrp_jit when one install first mrp and after that, mrp_jit. get_phantom_bom_id defined in mrp module which is not dependent for mrp_jit. bzr revid: pso@tinyerp.com-20120726060836-jcbx6d95pl4nbx9m --- addons/mrp_jit/mrp_jit.xml | 1 - addons/procurement/procurement.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/mrp_jit/mrp_jit.xml b/addons/mrp_jit/mrp_jit.xml index 6856285b9a6..99f74a19517 100644 --- a/addons/mrp_jit/mrp_jit.xml +++ b/addons/mrp_jit/mrp_jit.xml @@ -4,7 +4,6 @@ - diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index debeddc607e..5f2fb1e161c 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -320,6 +320,12 @@ class procurement_order(osv.osv): return True return False + #Initialize get_phantom_bom_id method as it is raising an error from yml of mrp_jit + #when one install first mrp and after that, mrp_jit. get_phantom_bom_id defined in mrp module + #which is not dependent for mrp_jit. + def get_phantom_bom_id(self, cr, uid, ids, context=None): + return False + def action_confirm(self, cr, uid, ids, context=None): """ Confirms procurement and writes exception message if any. @return: True From 51587deece85aff8b76afc638fd6d04933730d6a Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Thu, 26 Jul 2012 15:16:08 +0530 Subject: [PATCH 13/18] [IMP] mrp_operations: Improved yml bzr revid: pso@tinyerp.com-20120726094608-i7ztkary8x8e2bia --- addons/mrp_operations/test/workcenter_operations.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/mrp_operations/test/workcenter_operations.yml b/addons/mrp_operations/test/workcenter_operations.yml index f24c1fbd5c7..6036316743c 100644 --- a/addons/mrp_operations/test/workcenter_operations.yml +++ b/addons/mrp_operations/test/workcenter_operations.yml @@ -1,3 +1,6 @@ +- + In order to test mrp_operations with OpenERP, I refer created production order of PC Assemble SC349 + with routing - Manual Component's Assembly to test complete production process with respect of workcenter. - I compute the production order. - @@ -67,7 +70,7 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_cancel', cr) - - I reset first work operation and start after resolve techninal fault of work center. + I reset first work operation and start after resolving techninal fault of work center. - !python {model: mrp.production}: | import netsvc @@ -76,7 +79,7 @@ wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_draft', cr) wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr) - - Now Finished work of first work operation so I close that operation. + I close first work operation as this work center completed its process. - !python {model: mrp.production}: | import netsvc @@ -84,7 +87,7 @@ wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_done', cr) - - Now I close other operations after start one by one. + Now I close other operations one by one which are in start state. - !python {model: mrp.production}: | import netsvc From 4a440a9953bd5e299ee96d430c692aa9ee067e58 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Thu, 26 Jul 2012 15:16:58 +0530 Subject: [PATCH 14/18] [IMP] mrp_operations: Improved yml bzr revid: pso@tinyerp.com-20120726094658-si1qsl70jma8lp2g --- addons/mrp_operations/test/workcenter_operations.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/mrp_operations/test/workcenter_operations.yml b/addons/mrp_operations/test/workcenter_operations.yml index 6036316743c..c1449657967 100644 --- a/addons/mrp_operations/test/workcenter_operations.yml +++ b/addons/mrp_operations/test/workcenter_operations.yml @@ -51,7 +51,6 @@ order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_pause', cr) - wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr) - I resume first work operation. - @@ -102,7 +101,6 @@ - !python {model: mrp.production}: | order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context) - print order.state assert order.state == 'done', "Production should be closed after finished all operations." - I print a Barcode Report of Operation line. From a528e41af5f8b843c65c5cee9502c4f08a6b1c9b Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Thu, 26 Jul 2012 15:30:05 +0530 Subject: [PATCH 15/18] [IMP] mrp_jit, mrp_repair: Improved yml bzr revid: pso@tinyerp.com-20120726100005-zgtul1s7g7bvounr --- addons/mrp_jit/test/mrp_jit.yml | 4 ++-- .../mrp_repair/test/test_mrp_repair_afterinv.yml | 16 ++++++++-------- addons/mrp_repair/test/test_mrp_repair_b4inv.yml | 12 ++++++------ .../mrp_repair/test/test_mrp_repair_noneinv.yml | 12 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/addons/mrp_jit/test/mrp_jit.yml b/addons/mrp_jit/test/mrp_jit.yml index 7a7a73dfe95..8a375a70ed6 100644 --- a/addons/mrp_jit/test/mrp_jit.yml +++ b/addons/mrp_jit/test/mrp_jit.yml @@ -1,6 +1,6 @@ - - In order to test mrp_jit module with OpenERP, I will create manufacturing order - and check whether the procurement orders run without scheduler or not. + In order to test mrp_jit module with OpenERP, I create manufacturing order + and check whether the procurement order run without scheduler or not. - !record {model: procurement.order, id: mrp_production_mo0}: company_id: base.main_company diff --git a/addons/mrp_repair/test/test_mrp_repair_afterinv.yml b/addons/mrp_repair/test/test_mrp_repair_afterinv.yml index 0d4eb9b1c7c..5ceb3f9b02b 100644 --- a/addons/mrp_repair/test/test_mrp_repair_afterinv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_afterinv.yml @@ -1,25 +1,25 @@ - - In order to test invoice type after repair. + In order to test Invoice Method 'After Repair'. - - I Confirm Repair order For Invoice Type After repair. + I confirm Repair order taking Invoice Method 'After Repair'. - !workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp0} - - I start the repairing process by click on "Start Repair" Button For Invoice Type After repair. + I start the Repairing process by clicking on "Start Repair" button for Invoice Method 'After Repair'. - !workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp0} - - I check that state is "Under Repair". + I check the state is in "Under Repair". - !assert {model: mrp.repair, id: mrp_repair_rmrp0}: - state == 'under_repair' - - Repairing Process for product is Done and I End Repair process by click on "End Repair" button. + Repairing process for product is in Done state and I end Repair process by clicking on "End Repair" button. - !workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp0} - - I define invoiced after repair option in this Repair order. - so I create Invoice by click on "Make Invoice" wizard. + I define Invoice Method 'After Repair' option in this Repair order. + so I create invoice by clicking on "Make Invoice" wizard. - !record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}: group: 1 @@ -29,7 +29,7 @@ !python {model: mrp.repair.make_invoice}: | self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rmrp0")]}) - - I check that Invoice is created for this repair order. + I check that invoice is created for this Repair order. - !python {model: mrp.repair}: | repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp0')], context=context)[0] diff --git a/addons/mrp_repair/test/test_mrp_repair_b4inv.yml b/addons/mrp_repair/test/test_mrp_repair_b4inv.yml index bfe717ecdd6..9ea28a9ecf4 100644 --- a/addons/mrp_repair/test/test_mrp_repair_b4inv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_b4inv.yml @@ -1,11 +1,11 @@ - - Now test invoice type before repair. + Now I test for Invoice Method 'Before Repair'. - - I Confirm Repair order For Invoice Type Before Repair. + I confirm Repair order for Invoice Method 'Before Repair'. - !workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp2} - - Repair order state to 'Ready'. + I change Repair order state to 'Ready'. - !python {model: mrp.repair}: | self.action_repair_ready(cr, uid, [ref('mrp_repair_rmrp2')], context=None) @@ -14,16 +14,16 @@ - !workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rmrp2} - - I check that Invoice is created for this repair order. + I check that invoice is created for this Repair order. - !python {model: mrp.repair}: | repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp2')], context=context)[0] assert repair_id.invoice_id.id, _("No invoice exists for this repair order.") - - I start the repairing process by click on "Start Repair" Button. + I start the Repairing process by clicking on "Start Repair" button. - !workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rmrp2} - - Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type before repair. + Repairing process for this product is in Done state and I end this process by clicking on "End Repair" button for Invoice Method 'Before Repair'. - !workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp2} diff --git a/addons/mrp_repair/test/test_mrp_repair_noneinv.yml b/addons/mrp_repair/test/test_mrp_repair_noneinv.yml index 66d5017e840..4334af01958 100644 --- a/addons/mrp_repair/test/test_mrp_repair_noneinv.yml +++ b/addons/mrp_repair/test/test_mrp_repair_noneinv.yml @@ -1,24 +1,24 @@ - - In order to test "mrp_repair" module, I start from confirm it, and start repair. + In order to test "mrp_repair" module, I start with confirm state, and start repair. - - I Confirm Repair order for Invoice Type 'None'. + I confirm Repair order for Invoice Method 'No Invoice'. - !workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp1} - - I start the repairing process by click on "Start Repair" Button For Invoice Type None. + I start the repairing process by clicking on "Start Repair" button for Invoice Method 'No Invoice'. - !workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp1} - - I check that state is "Under Repair". + I check its state which is in "Under Repair". - !assert {model: mrp.repair, id: mrp_repair_rmrp1}: - state == 'under_repair' - - Repairing Process for product is Done and I End Repair process by click on "End Repair" button. + Repairing process for product is in Done state and I end this process by clicking on "End Repair" button. - !workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp1} - - I define invoiced none option in this Repair order. + I define Invoice Method 'No Invoice' option in this repair order. So, I check that Invoice should not be created for this repair order. - !python {model: mrp.repair}: | From 739a05c00af20fb0ab69aa333a96b83ca752e243 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Mon, 30 Jul 2012 12:21:32 +0530 Subject: [PATCH 16/18] [IMP] mrp: Removed comment from __openerp__.py bzr revid: pso@tinyerp.com-20120730065132-x50rhei1ya36y3u5 --- addons/mrp/__openerp__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/mrp/__openerp__.py b/addons/mrp/__openerp__.py index 5f723f1b9df..bdf6f63b755 100644 --- a/addons/mrp/__openerp__.py +++ b/addons/mrp/__openerp__.py @@ -90,8 +90,6 @@ Dashboard provided by this module: 'demo_xml': [ 'mrp_demo.xml', ], - #TODO: This yml tests are needed to be completely reviewed again because the product wood panel is removed in product demo as it does not suit for new demo context of computer and consultant company - # so the ymls are too complex to change at this stage 'test': [ 'test/order_demo.yml', 'test/order_process.yml', From 5cd867c083a307d8afff20aad4d8a921b4f5984c Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Mon, 30 Jul 2012 18:17:15 +0530 Subject: [PATCH 17/18] [IMP] mrp_jit: Changed product and improved message bzr revid: pso@tinyerp.com-20120730124715-njq1wk7sz5hvmue9 --- addons/mrp_jit/test/mrp_jit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp_jit/test/mrp_jit.yml b/addons/mrp_jit/test/mrp_jit.yml index 8a375a70ed6..0580de9d9ec 100644 --- a/addons/mrp_jit/test/mrp_jit.yml +++ b/addons/mrp_jit/test/mrp_jit.yml @@ -1,13 +1,13 @@ - - In order to test mrp_jit module with OpenERP, I create manufacturing order - and check whether the procurement order run without scheduler or not. + In order to test mrp_jit module with OpenERP, I create procurement order + and check whether it runs without scheduler or not. - !record {model: procurement.order, id: mrp_production_mo0}: company_id: base.main_company date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S") location_id: stock.stock_location_stock name: PROC/TEST/0001 - product_id: product.product_product_4 + product_id: product.product_product_16 product_qty: 10.0 product_uom: product.product_uom_unit product_uos_qty: 0.0 From 51e1d956aed14d1039999e18ed1e89ce0e12db84 Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Mon, 30 Jul 2012 18:49:26 +0530 Subject: [PATCH 18/18] [IMP] mrp_jit: Changed id and improved message bzr revid: pso@tinyerp.com-20120730131926-h9ptbsfgfogncl57 --- addons/mrp_jit/test/mrp_jit.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mrp_jit/test/mrp_jit.yml b/addons/mrp_jit/test/mrp_jit.yml index 0580de9d9ec..4b847c4608d 100644 --- a/addons/mrp_jit/test/mrp_jit.yml +++ b/addons/mrp_jit/test/mrp_jit.yml @@ -1,8 +1,8 @@ - - In order to test mrp_jit module with OpenERP, I create procurement order - and check whether it runs without scheduler or not. + In order to test mrp_jit module with OpenERP, I create procurement order for + Computer Case product and check whether it runs without scheduler or not. - - !record {model: procurement.order, id: mrp_production_mo0}: + !record {model: procurement.order, id: procurement_order_test1}: company_id: base.main_company date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S") location_id: stock.stock_location_stock @@ -15,10 +15,10 @@ | I confirm the procurement order PROC/TEST/0001. - - !workflow {model: procurement.order, action: button_confirm, ref: mrp_production_mo0} + !workflow {model: procurement.order, action: button_confirm, ref: procurement_order_test1} - | I check that the procurement is scheduled automatically. - - !assert {model: procurement.order, id: mrp_production_mo0, string: procstate}: + !assert {model: procurement.order, id: procurement_order_test1, string: procstate}: - state<>'confirmed'