parent
80ab65e3bc
commit
1b7d69bfdc
|
@ -7,6 +7,7 @@
|
|||
acc_number: '987654321'
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
sequence: 0.0
|
||||
name: Fortis
|
||||
state: bank
|
||||
-
|
||||
I create a new employee “Richard”
|
||||
|
|
|
@ -2,34 +2,23 @@
|
|||
In order to test mrp_jit module with OpenERP, I will create manufacturing order
|
||||
and check whether the procurement orders run without scheduler or not.
|
||||
-
|
||||
!record {model: mrp.production, id: mrp_production_mo0}:
|
||||
bom_id: mrp.mrp_bom_1
|
||||
!record {model: procurement.order, id: mrp_production_mo0}:
|
||||
company_id: base.main_company
|
||||
date_planned: '2010-08-05 17:59:49'
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_src_id: stock.stock_location_stock
|
||||
name: MO/00017
|
||||
location_id: stock.stock_location_stock
|
||||
name: PROC/TEST/0001
|
||||
product_id: product.product_product_pc2
|
||||
product_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
routing_id: mrp.mrp_routing_0
|
||||
-
|
||||
|
|
||||
I confirm production order.
|
||||
I confirm the procurement order PROC/TEST/0001.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
|
||||
!workflow {model: procurement.order, action: button_confirm, ref: mrp_production_mo0}
|
||||
-
|
||||
|
|
||||
I check the procurement orders generated from the production order.
|
||||
I check that the procurement is scheduled automatically.
|
||||
-
|
||||
|
|
||||
It runs without using schedulers.
|
||||
-
|
||||
!python {model: procurement.order}: |
|
||||
prod_obj = self.pool.get('mrp.production')
|
||||
production = prod_obj.browse(cr, uid, ref('mrp_production_mo0'))
|
||||
products = map(lambda x:x.product_id.id, production.move_lines)
|
||||
procurement_ids = self.search(cr, uid, [('product_id','in',products)])
|
||||
procurements = self.browse(cr, uid, procurement_ids)
|
||||
assert all(proc.state != 'confirmed' for proc in procurements), 'Procurement not scheduled!'
|
||||
!assert {model: procurement.order, id: mrp_production_mo0, string: procstate}:
|
||||
- state<>'confirmed'
|
||||
|
|
Loading…
Reference in New Issue