Skip to content
Snippets Groups Projects
Commit 4a064b93 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[FIX] stock: error on stock.partial.move creation

The stock_partial_move wizard removes the required attribute for the field picking_id on a stock.partial.move. This means that we could get moves without picking_id and the previous line was failing ('NoneType' object has no attribute 'currency_id'). opw 614531
parent 9c77f794
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,7 @@ class stock_partial_picking(osv.osv_memory):
'move_id' : move.id,
'location_id' : move.location_id.id,
'location_dest_id' : move.location_dest_id.id,
'currency': move.picking_id.company_id.currency_id.id,
'currency': move.picking_id and move.picking_id.company_id.currency_id.id or False,
}
if move.picking_id.type == 'in' and move.product_id.cost_method == 'average':
partial_move.update(update_cost=True, **self._product_cost_for_average_update(cr, uid, move))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment