[IMP]improve mrp yaml
bzr revid: sgo@tinyerp.com-20130328115801-kh4k8ctnh3x5oae2
This commit is contained in:
parent
2aa1350efc
commit
21c4fee43d
|
@ -1,8 +1,3 @@
|
|||
-
|
||||
MRP user can doing all process related to Production Order, so let's check data with giving the access rights of user.
|
||||
-
|
||||
!context
|
||||
uid: 'res_users_mrp_user'
|
||||
-
|
||||
I compute the production order.
|
||||
-
|
||||
|
@ -28,6 +23,7 @@
|
|||
I confirm the Production Order.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_test1}
|
||||
|
||||
-
|
||||
I check details of Produce Move of Production Order to trace Final Product.
|
||||
-
|
||||
|
@ -63,6 +59,16 @@
|
|||
assert move_line.product_uos.id == order_line.product_uos.id, "UOS is not correspond in 'To consume line'."
|
||||
assert move_line.location_id.id == routing_loc or order.location_src_id.id, "Source location is not correspond in 'To consume line'."
|
||||
assert move_line.location_dest_id.id == source_location_id, "Destination Location is not correspond in 'To consume line'."
|
||||
-
|
||||
I consume raw materials and put one material in scrap location due to waste it.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
scrap_location_ids = self.pool.get('stock.location').search(cr, uid, [('scrap_location','=',True)])
|
||||
scrap_location_id = scrap_location_ids[0]
|
||||
order = self.browse(cr, uid, ref("mrp_production_test1"))
|
||||
for move in order.move_lines:
|
||||
if move.product_id.id == ref("product.product_product_6"):
|
||||
move.action_scrap(5.0, scrap_location_id)
|
||||
-
|
||||
I check details of an Internal Shipment after confirmed production order to bring components in Raw Materials Location.
|
||||
-
|
||||
|
@ -154,17 +160,6 @@
|
|||
!python {model: mrp.production}: |
|
||||
order = self.browse(cr, uid, ref("mrp_production_test1"))
|
||||
assert order.state == 'in_production', 'Production order should be in production State.'
|
||||
-
|
||||
I consume raw materials and put one material in scrap location due to waste it.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
scrap_location_ids = self.pool.get('stock.location').search(cr, uid, [('scrap_location','=',True)])
|
||||
scrap_location_id = scrap_location_ids[0]
|
||||
order = self.browse(cr, uid, ref("mrp_production_test1"))
|
||||
for move in order.move_lines:
|
||||
move.action_consume(move.product_qty)
|
||||
if move.product_id.id == ref("product.product_product_6"):
|
||||
move.action_scrap(5.0, scrap_location_id)
|
||||
-
|
||||
I produce product.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue