[FIX] sale_mrp: error in yaml test
bzr revid: qdp-launchpad@openerp.com-20121005092821-hdljhcpjb1wrz290
This commit is contained in:
parent
1e14590784
commit
cd55ed1a08
|
@ -117,26 +117,13 @@
|
|||
proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
|
||||
assert proc_ids, _('Procurement is not in the running state!')
|
||||
-
|
||||
I verify that a manufacturing order has been generated
|
||||
I verify that a manufacturing order has been generated, and that its name and reference are correct
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
mnf_obj = self.pool.get('mrp.production')
|
||||
so = self.browse(cr, uid, ref("sale_order_so0"))
|
||||
mnf_obj=self.pool.get('mrp.production')
|
||||
mnf_id=mnf_obj.search(cr, uid, [('origin','=',so.name)])
|
||||
mnf_id = mnf_obj.search(cr, uid, [('origin','=',so.name)])
|
||||
assert mnf_id, _('Manufacturing order has not been generated')
|
||||
-
|
||||
I verify that a 'Sale Name' field of Manufacturing order gets bind with the value
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so0"))
|
||||
mnf_obj=self.pool.get('mrp.production')
|
||||
mnf_id=mnf_obj.search(cr, uid, [('sale_name','=',so.name)])
|
||||
assert mnf_id, _('Sale Name is not bind with the value')
|
||||
-
|
||||
I verify that a 'Sale Reference' field of Manufacturing order gets bind with the value
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so0"))
|
||||
mnf_obj=self.pool.get('mrp.production')
|
||||
mnf_id=mnf_obj.search(cr, uid, [('sale_ref','=',so.client_order_ref)])
|
||||
assert mnf_id, _('Sale Reference is not bind with the value')
|
||||
mo = mnf_obj.browse(cr, uid, mnf_id)[0]
|
||||
assert mo.sale_name == so.name, 'Wrong Name for the Manufacturing Order. Expected %s, Got %s' % (so.name, mo.name)
|
||||
assert mo.sale_ref == so.client_order_ref, 'Wrong Sale Reference for the Manufacturing Order'
|
||||
|
|
Loading…
Reference in New Issue