From 20dac09d57ff0b7fe777ca8dfdeac813f392f9e5 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Wed, 16 Nov 2011 12:54:03 +0530 Subject: [PATCH] [IMP]sale: Improve code for run_scheduler.yml bzr revid: dbr@tinyerp.com-20111116072403-padjtci09myqal0t --- addons/sale/test/process/run_scheduler.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/addons/sale/test/process/run_scheduler.yml b/addons/sale/test/process/run_scheduler.yml index 42ca2872008..a7211dcb826 100644 --- a/addons/sale/test/process/run_scheduler.yml +++ b/addons/sale/test/process/run_scheduler.yml @@ -16,9 +16,8 @@ - I run the scheduler. - - !function {model: procurement.order, name: run_scheduler}: - - model: procurement.order - search: "[('state','=','confirmed')]" + !python {model: procurement.order}: | + self.run_scheduler(cr, uid) - I check that the procurement for the product PC2 is in exception state. As PC2 product's supply method is produce and the BoM is not defined. @@ -26,7 +25,4 @@ !python {model: procurement.order}: | from tools.translate import _ proc_ids = self.search(cr, uid, [('state','=','exception'),('product_id','=',ref('product.product_product_pc2'))]) - try: - assert not proc_ids, _('There is no procurement in exception state!') - except: - pass + assert proc_ids, _('There is no procurement in exception state!')