From ca09a748500a3f6fe8d063ceba4494b05280bf28 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Wed, 18 Jul 2012 18:11:19 +0530 Subject: [PATCH] [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,