From eb652b39b843a2e18c7bffebfcb5e464938c6f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Oct 2009 09:15:20 +0100 Subject: [PATCH] Set planned date on inventory moves of shipments for issue1259 (transplanted from de0012795f472c56e5f5484f8c4deec1e1b6c093) --- packing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packing.py b/packing.py index 34ff32cd86..43c190ca58 100644 --- a/packing.py +++ b/packing.py @@ -267,6 +267,9 @@ class PackingIn(OSV): res['to_location'] = incoming_move.packing_in.warehouse.\ storage_location.id res['state'] = 'draft' + # Product will be considered in stock only when the inventory + # move will be made: + res['planned_date'] = False res['company'] = incoming_move.company.id return res @@ -550,6 +553,7 @@ class PackingOut(OSV): 'quantity': out_quantity, 'packing_out': packing.id, 'state': 'draft', + 'planned_date': shipment.planned_date, 'company': move.company.id, 'currency': move.company.currency.id, 'unit_price': unit_price, @@ -631,6 +635,7 @@ class PackingOut(OSV): 'uom': move.uom.id, 'quantity': inv_quantity, 'packing_out': packing.id, + 'planned_date': move.planned_date, 'state': 'draft', 'company': move.company.id, }, context=context)