[FIX] Check for None when reserving quants, add to demo data of multi warehouse

bzr revid: jco@openerp.com-20130904083837-g668i3g1fyt26gp1
This commit is contained in:
Josse Colpaert
2013-09-04 10:38:37 +02:00
parent a792608e87
commit bf12d53516
2 changed files with 21 additions and 3 deletions
+1 -2
View File
@@ -774,7 +774,7 @@ class stock_picking(osv.osv):
quant_obj.quants_reserve(cr, uid, quants, move, context=context)
#In the end, move quants in correct package
if create:
quant_obj.write(cr, uid, [x[0].id for x in quants], {'package_id': ops.result_package_id and ops.result_package_id.id or False}, context=context)
quant_obj.write(cr, uid, [x[0].id for x in quants if x != None], {'package_id': ops.result_package_id and ops.result_package_id.id or False}, context=context)
res2[move.id] -= qty
res[ops.id] = {}
res[ops.id][ops.product_id.id] = qty_to_do
@@ -1037,7 +1037,6 @@ class stock_move(osv.osv):
for quant in move.reserved_quant_ids:
res[move.id] -= quant.qty
return res
def _get_lot_ids(self, cr, uid, ids, field_name, args, context=None):
res = dict.fromkeys(ids, False)
@@ -53,7 +53,7 @@
name: Panama Santiago District Warehouse
lot_stock_id: location_panama_santiago
-
Create picking types for this warehouse
Create picking type in for this warehouse
-
!record {model: stock.picking.type, id: picking_type_santiago_in}:
name: Reception
@@ -61,6 +61,25 @@
sequence_id: stock.seq_picking_type_in
warehouse_id: wh_panama_santiago
default_location_dest_id: location_panama_santiago_input
-
Create picking type out for this warehouse
-
!record {model: stock.picking.type, id: picking_type_santiago_out}:
name: Deliveries
code_id: outgoing
sequence_id: stock.seq_picking_type_out
warehouse_id: wh_panama_santiago
default_location_src_id: location_panama_santiago_output
-
Create picking type internal for this warehouse
-
!record {model: stock.picking.type, id: picking_type_santiago_internal}:
name: Deliveries
code_id: internal
sequence_id: stock.seq_picking_type_internal
warehouse_id: wh_panama_santiago
default_location_src_id: location_panama_santiago_input
default_location_dest_id: location_panama_santiago_stock
-
Create Location structure of Warehouse Panama Main
-