diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b379b290ec3..b79cb0c6ca6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1396,7 +1396,7 @@ class stock_move(osv.osv): uos_qty = quantity / move_qty * move.product_uos_qty default_val = { 'location_id': source_location.id, - 'product_qty': quantity, + 'product_uom_qty': quantity, 'product_uos_qty': uos_qty, 'state': move.state, 'scrapped': True, diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index cf1ae986c08..6e2c9a5db71 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -103,7 +103,7 @@ class stock_move_scrap(osv.osv_memory): res = super(stock_move_consume, self).default_get(cr, uid, fields, context=context) move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context) location_obj = self.pool.get('stock.location') - scrpaed_location_ids = location_obj.search(cr, uid, [('scrap_location','=',True)]) + scrap_location_id = location_obj.search(cr, uid, [('scrap_location','=',True)]) if 'product_id' in fields: res.update({'product_id': move.product_id.id}) @@ -112,8 +112,8 @@ class stock_move_scrap(osv.osv_memory): if 'product_qty' in fields: res.update({'product_qty': move.product_qty}) if 'location_id' in fields: - if scrpaed_location_ids: - res.update({'location_id': scrpaed_location_ids[0]}) + if scrap_location_id: + res.update({'location_id': scrap_location_id[0]}) else: res.update({'location_id': False})