[FIX] stock: typos

bzr revid: qdp-launchpad@openerp.com-20140224140512-2r4ogs6ku1frtp3c
This commit is contained in:
Quentin (OpenERP) 2014-02-24 15:05:12 +01:00
parent 8a7d139a41
commit 96ffae6e63
2 changed files with 8 additions and 8 deletions

View File

@ -3517,12 +3517,12 @@ class stock_pack_operation(osv.osv):
if not qty > 0:
break
if ops.package_id:
bool = quant.package_id and bool(package_obj.search(cr, uid, [('id', 'child_of', [ops.package_id.id]), ('id', '=', quant.package_id.id)], context=context)) or False
flag = quant.package_id and bool(package_obj.search(cr, uid, [('id', 'child_of', [ops.package_id.id]), ('id', '=', quant.package_id.id)], context=context)) or False
else:
bool = not quant.package_id.id
bool = bool and ((ops.lot_id and ops.lot_id.id == quant.lot_id.id) or not ops.lot_id)
bool = bool and (ops.owner_id.id == quant.owner_id.id)
if bool:
flag = not quant.package_id.id
flag = flag and ((ops.lot_id and ops.lot_id.id == quant.lot_id.id) or not ops.lot_id)
flag = flag and (ops.owner_id.id == quant.owner_id.id)
if flag:
quant_qty = quant.qty
if quants_done.get(quant.id):
if quants_done[quant.id] == 0:

View File

@ -139,11 +139,11 @@
backorder_ids = self.search(cr, uid, [('backorder_id', '=', ref('delivery_order1'))], context=context)
assert backorder_ids, "Backorder should have been created"
self.do_prepare_partial(cr, uid, backorder_ids, context=context)
picking = self.browse(cr, uid backorder_ids[0])
picking = self.browse(cr, uid, backorder_ids[0])
assert len(picking.pack_operation_ids) == 2, "Wrong number of pack operation"
assert picking.pack_operation_ids[0].produc_qty == 100, "Wrong quantity in pack operation"
assert picking.pack_operation_ids[0].product_qty == 100, "Wrong quantity in pack operation"
assert picking.pack_operation_ids[0].package_id.name == 'Pallet 2', "Wrong pallet in pack operation"
assert picking.pack_operation_ids[1].produc_qty == 50, "Wrong quantity in pack operation"
assert picking.pack_operation_ids[1].product_qty == 50, "Wrong quantity in pack operation"
assert picking.pack_operation_ids[1].package_id.name == 'Pallet 3', "Wrong pallet in pack operation"
self.action_assign(cr, uid, backorder_ids, context=context)
self.do_transfer(cr, uid, backorder_ids, context=context)