From 6385f41e0efaec7a65cb7d89c0ea4ccacad51d81 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Sun, 30 Jun 2013 00:08:18 +0200 Subject: [PATCH] [FIX] adapt write of one2many bzr revid: jco@openerp.com-20130629220818-fu1134l0g6gs9iwr --- addons/stock/stock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 081d07b4b05..f0dd901c487 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -350,7 +350,7 @@ class stock_location(osv.osv): categ = product.categ_id while (not categ.removal_strategy) and categ.parent_id: categ = categ.parent_id - return categ.removal_strategy or None + return categ.removal_strategy or 'fifo' def _product_get(self, cr, uid, id, product_ids=False, context=None, states=None): """ @@ -1610,7 +1610,7 @@ class stock_picking(osv.osv): 'move_dest_id': False, 'price_unit': product_price, 'product_uom': product_uoms[move.id], - 'reserved_quant_ids': list(done_reserved_quants) + 'reserved_quant_ids': [(4,x) for x in list(done_reserved_quants)] } prodlot_id = prodlot_ids[move.id] if prodlot_id: @@ -1625,7 +1625,7 @@ class stock_picking(osv.osv): 'product_uos_qty': move.product_qty - partial_qty[move.id], #TODO: put correct uos_qty 'prodlot_id': False, 'tracking_id': False, - 'reserved_quant_ids': list(set(possible_quants) - done_reserved_quants), + 'reserved_quant_ids': [(4,x) for x in list(set(possible_quants) - done_reserved_quants)], }) if new_picking: