[REF] sale_mrp: adapt tests to new stock implementation

This commit is contained in:
Pierre Masereel
2017-07-14 17:08:22 +02:00
committed by Simon Lejeune
parent 9254dda8a1
commit f8e749a04d
+4 -4
View File
@@ -365,8 +365,8 @@ class TestSaleMrpFlow(common.TransactionCase):
# deliver partially (1 of each instead of 5), check the so's invoice_status and delivered quantities
pick = self.so.picking_ids
pick.force_assign()
pick.pack_operation_product_ids.write({'qty_done': 1})
wiz_act = pick.do_new_transfer()
pick.move_lines.write({'quantity_done': 1})
wiz_act = pick.button_validate()
wiz = self.env[wiz_act['res_model']].browse(wiz_act['res_id'])
wiz.process()
@@ -377,8 +377,8 @@ class TestSaleMrpFlow(common.TransactionCase):
self.assertEqual(len(self.so.picking_ids), 2, 'Sale MRP: number of pickings should be 2')
pick_2 = self.so.picking_ids[0]
pick_2.force_assign()
pick_2.pack_operation_product_ids.write({'qty_done': 4})
pick_2.do_new_transfer()
pick_2.move_lines.write({'quantity_done': 4})
pick_2.button_validate()
del_qty = sum(sol.qty_delivered for sol in self.so.order_line)
self.assertEqual(del_qty, 5.0, 'Sale MRP: delivered quantity should be 5.0 after complete delivery of a kit')