From daf3593aa716f1513c3ea9f5d1934f54d94de867 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Mon, 6 Oct 2008 12:15:15 +0200 Subject: [PATCH] Added currency and price when creating outgoing moves on customer packing: use defaut list price on product and company currency. --- packing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packing.py b/packing.py index c896fd1787..a94af10105 100644 --- a/packing.py +++ b/packing.py @@ -487,6 +487,9 @@ class PackingOut(OSV): else: out_quantity = move.quantity + unit_price = uom_obj.compute_price( + cursor, user, move.product.default_uom, move.product.list_price, + move.uom, context=context) move_obj.create(cursor, user, { 'from_location': move.to_location.id, 'to_location': packing.customer_location.id, @@ -496,6 +499,8 @@ class PackingOut(OSV): 'packing_out': packing.id, 'state': 'draft', 'company': move.company.id, + 'currency': move.company.currency.id, + 'unit_price': unit_price, }, context=context) #Re-read the packing and remove exceeding quantities