[FIX] Prints for drop ship on runbot

bzr revid: jco@openerp.com-20130917090729-1v54wj63cyg2ox7k
This commit is contained in:
Josse Colpaert 2013-09-17 11:07:29 +02:00
parent 664b94b321
commit 660cbcb645
1 changed files with 5 additions and 1 deletions

View File

@ -63,12 +63,16 @@
procurement_order = self.pool.get("procurement.group").browse(cr, uid, sale_record.procurement_group_id.id).procurement_ids[0]
purchase_id = procurement_order.purchase_line_id.order_id.id
picking_id = self.search(cr, uid, [('purchase_id', '=', purchase_id)])
print [(x.move_lines[0].product_id.name, x.move_lines[0].product_uom_qty) for x in self.browse(cr, uid, picking_id)]
self.do_partial(cr, uid, picking_id)
-
Check one quant was created in Customers location with 200 pieces and one move in the history_ids
-
!python {model: stock.quant}: |
quant_ids = self.search(cr, uid, [('location_id', '=', ref('stock.stock_location_customers')),('product_id', '=', ref("drop_shop_product"))])
print "Quants", quant_ids
quant_ids = self.search(cr, uid, [('location_id', '=', ref('stock.stock_location_customers')),('qty', '=', 200), ('product_id', '=', ref("drop_shop_product"))])
print "Quants", quant_ids
assert quant_ids, 'No Quant found'
assert len(quant_ids) == 1
assert len(self.browse(cr, uid, quant_ids)[0].history_ids) == 1
assert len(self.browse(cr, uid, quant_ids)[0].history_ids) == 1