[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,12 +51,17 @@
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
* Check that the purchase order has been well created
* Cancel the main procurement
* Check that all procurements related and the purchase order has been well cancelled
* Check that all procurements related and the purchase order has been well cancelled
-
!python {model: procurement.order}: |
# Retrieve related procu
@ -65,7 +70,7 @@
assert len(procu_ids)>0, 'No procurements are found for sale order "%s" (with id : %d)' %(so.name, so.id)
# Check that all procurements are running
for procu in self.browse(cr, uid, procu_ids, context=context):
for procu in self.browse(cr, uid, procu_ids, context=context):
assert procu.state == u'running', 'Procurement with id %d should be "running" but is with a state : %s!' %(procu.id, procu.state)
# Check that one production order exist

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,8 +108,8 @@
!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')])
# Check that all procurement are 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)
-