diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 380df7844c7..93f0e651420 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1554,9 +1554,10 @@ class stock_move(osv.osv): source_location = move.location_id if move.state == 'done': source_location = move.location_dest_id - if source_location.usage != 'internal': + #Previously used to prevent scraping from virtual location but not necessary anymore + #if source_location.usage != 'internal': #restrict to scrap from a virtual location because it's meaningless and it may introduce errors in stock ('creating' new products from nowhere) - raise osv.except_osv(_('Error!'), _('Forbidden operation: it is not allowed to scrap products from a virtual location.')) + #raise osv.except_osv(_('Error!'), _('Forbidden operation: it is not allowed to scrap products from a virtual location.')) move_qty = move.product_qty uos_qty = quantity / move_qty * move.product_uos_qty default_val = { diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 0eca4f6f65b..fa723d283a9 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -595,7 +595,6 @@ - @@ -618,6 +617,7 @@ + @@ -625,6 +625,7 @@ + diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index 6e2c9a5db71..4abefce8b6a 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -109,8 +109,6 @@ class stock_move_scrap(osv.osv_memory): res.update({'product_id': move.product_id.id}) if 'product_uom' in fields: res.update({'product_uom': move.product_uom.id}) - if 'product_qty' in fields: - res.update({'product_qty': move.product_qty}) if 'location_id' in fields: if scrap_location_id: res.update({'location_id': scrap_location_id[0]})