From a3485b82c4aeeef8b69771006eaad09e6480b3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Mar 2012 09:37:46 +0200 Subject: [PATCH] Add missing initialisation of unit_price in on_change_product --- move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/move.py b/move.py index f62be7eaab..76e6e0f6d9 100644 --- a/move.py +++ b/move.py @@ -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