From 3349187aab929cda9db320769831532ddd0b10cb Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Wed, 14 Jan 2015 12:40:49 +0100 Subject: [PATCH] [FIX] stock: propagate owner to backorder moves When delivering partially a picking in which the moves had an owner (`restrict_partner_id`) set, the owner were not kept in the backorder moves. Closes #4693 --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 819521ea3fd..dcc391ccc81 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2579,12 +2579,15 @@ class stock_move(osv.osv): 'product_uos_qty': uos_qty, 'procure_method': 'make_to_stock', 'restrict_lot_id': restrict_lot_id, - 'restrict_partner_id': restrict_partner_id, 'split_from': move.id, 'procurement_id': move.procurement_id.id, 'move_dest_id': move.move_dest_id.id, 'origin_returned_move_id': move.origin_returned_move_id.id, } + + if restrict_partner_id: + defaults['restrict_partner_id'] = restrict_partner_id + if context.get('source_location_id'): defaults['location_id'] = context['source_location_id'] new_move = self.copy(cr, uid, move.id, defaults, context=context)