[IMP] Make sure tests pass without procurement_jit installation

bzr revid: jco@openerp.com-20140424093654-r04xvcp544du1lkj
This commit is contained in:
Josse Colpaert 2014-04-24 11:36:54 +02:00
parent 7e733fcfaa
commit bf5585851a
2 changed files with 10 additions and 5 deletions

View File

@ -51,6 +51,11 @@
Confirm sales order
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_product_manu}
-
I run scheduler.
-
!python {model: procurement.order}: |
self.run_scheduler(cr, uid)
-
Check the propagation when we cancel the main procurement
* Retrieve related procurements and check that there are all running

View File

@ -100,7 +100,7 @@
!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)])
proc_ids = self.search(cr, uid, [('origin','like',so.name)])
self.run(cr, uid, proc_ids)
-
I verify that a procurement state is "running"
@ -108,7 +108,7 @@
!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','like',so.name), ('state','=','running')])
proc_ids = self.search(cr, uid, [('origin','like',so.name)])
# Check that all procurement are running
for procu in self.browse(cr,uid,proc_ids,context=context):
assert procu.state == u'running', 'Procurement with id %d should be with a state "running" but is with a state : %s!' %(procu.id,procu.state)