From 124c990e7bee9fc1cc5f27cc9bf847f8a7560ae9 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 26 Sep 2011 15:30:05 +0200 Subject: [PATCH] [FIX] sale: tests should not fail if `purchase` is not installed bzr revid: odo@openerp.com-20110926133005-2zn030ar70oj002y --- addons/sale/test/manual_order_policy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/sale/test/manual_order_policy.yml b/addons/sale/test/manual_order_policy.yml index 35f38e8b23d..af515b2d4e4 100644 --- a/addons/sale/test/manual_order_policy.yml +++ b/addons/sale/test/manual_order_policy.yml @@ -138,8 +138,9 @@ !python {model: procurement.order}: | sale_order_obj = self.pool.get('sale.order') so = sale_order_obj.browse(cr, uid, ref("sale_order_so0")) - proc_ids = self.search(cr, uid, [('origin','=',so.name),('state','=','running')]) - assert(proc_ids),"Procurement is not in the running state!" + proc_ids = self.search(cr, uid, [('origin','=',so.name),('state','in',['running','ready'])]) + # should be running is 'purchase' is installed, else 'ready' + assert(proc_ids),"Procurement is not in running/ready state!" - I verify that a purchase order has been generated -