[FIX] stock: typos
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 24 Feb 2014 14:05:12 +0000 (15:05 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 24 Feb 2014 14:05:12 +0000 (15:05 +0100)
bzr revid: qdp-launchpad@openerp.com-20140224140512-2r4ogs6ku1frtp3c

addons/stock/stock.py
addons/stock/test/packing.yml

index 1bd499b..36c665c 100644 (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:
index 7bd9a38..ac61011 100644 (file)
     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)