Fix production_input field check

#035832
This commit is contained in:
Sim? Albert i Beltran 2018-10-26 09:34:34 +02:00
parent fd5fb0458a
commit d97f3bc8c9

View file

@ -89,7 +89,7 @@ class Move:
while lots and remainder > 0.0:
lot = lots.pop(0)
production_quantity = 0.0
if hasattr(move, 'production_input'):
if getattr(move, 'production_input', False):
for production_input in move.production_input.inputs:
if (production_input.product == move.product
and production_input.state == 'draft'