Add missing initialisation of unit_price in on_change_product

This commit is contained in:
Cédric Krier committed 2012-03-28 09:37:46 +02:00
1 parent 1532f220ee
commit a3485b82c4
1 file changed
+1
+1
View File
@@ -242,6 +242,7 @@ class Move(ModelSQL, ModelView):
from_location = location_obj.browse(vals['from_location'])
if vals.get('to_location'):
to_location = location_obj.browse(vals['to_location'])
unit_price = None
if from_location and from_location.type in ('supplier',
'production'):
unit_price = product.cost_price