Added currency and price when creating outgoing moves on customer packing:

use defaut list price  on product and company currency.
This commit is contained in:
Bertrand Chenal
2008-10-06 12:15:15 +02:00
parent 9caf9719ca
commit daf3593aa7
+5
View File
@@ -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